You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Matthew Horn (JIRA)" <ji...@apache.org> on 2017/01/27 23:00:26 UTC
[jira] [Commented] (CB-10696) Error while downloading file who are
having spaces between name in ios using cordova
[ https://issues.apache.org/jira/browse/CB-10696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843615#comment-15843615 ]
Matthew Horn commented on CB-10696:
-----------------------------------
I am having the same problem on iOS only, Android isn't affected.
iOS 10.2.1
PhoneGap (iOS / Android / Windows)
cli-6.4.0 (4.3.0 / 6.1.0 / 4.4.3)
cordova-plugin-file-transfer npm * 1.6.1
{code}
function downloadFile(sSourceUrl,sTarget,fnSuccess,fnError,fnProgress,oOptions){
var ft = new FileTransfer();
ft.onprogress = fnProgress; // Upload progress callback
ft.download(sSourceUrl,sTarget,fnSuccess,fnError,oOptions);
}
downloadFile(encodeURI('https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png'),
cordova.file.documentsDirectory + 'google logo.png,
function(){console.log('SUCCESS')},
function(error){console.log(ERROR',error)},
function(){});
{code}
Throws error code 1 - Could not create target file
> Error while downloading file who are having spaces between name in ios using cordova
> ------------------------------------------------------------------------------------
>
> Key: CB-10696
> URL: https://issues.apache.org/jira/browse/CB-10696
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin File Transfer
> Reporter: Akashdeep Sharma
> Priority: Minor
> Labels: cannot-reproduce, ios, triaged, wfc
>
> I have used the filetransfer code of your for file download and would like thank you for that tutorial. It work well on android but when i try to download a file that have space between it throws error in ios for example file name "Test Doc.pdf" its get downloaded in android but in ios throws error. Can you please guide what to do??
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org