You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vishal Mishra (JIRA)" <ji...@apache.org> on 2017/11/22 01:17:00 UTC

[jira] [Closed] (CB-11915) cordova-plugin-file-transfer 1.6.0 error 1 file not found

     [ https://issues.apache.org/jira/browse/CB-11915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vishal Mishra closed CB-11915.
------------------------------
    Resolution: Won't Fix

With the new features introduced in [XMLHttpRequest|https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest], this plugin is not needed any more. Migrating from this plugin to using the new features of [XMLHttpRequest|https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest], is explained in this [Cordova blog post|https://cordova.apache.org/blog/2017/10/18/from-filetransfer-to-xhr2.html].

> cordova-plugin-file-transfer 1.6.0 error 1 file not found 
> ----------------------------------------------------------
>
>                 Key: CB-11915
>                 URL: https://issues.apache.org/jira/browse/CB-11915
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-file-transfer (DEPRECATED)
>    Affects Versions: 3.5.0
>         Environment: Android
>            Reporter: matthew Wall
>
> In an existing project I updated the file-transfer plugin to 1.6.0 and it now returns file not found.
> Downgrading to 1.5.1 works as expected.
>  var url = encodeURI(config.rtc.Upload);
> 					
>                     var targetPath = $scope.imageSources[i].Photo;
>                     // File name only
>                     var filename = targetPath.split("/")
>                         .pop();
>                     photo_names.push(MemberID + "/" + filename);
>                     var options = {
>                         fileKey: "file",
>                         fileName: filename,
>                         chunkedMode: false,
>                         mimeType: "image/jpg",
>                         params: {
>                             'directory': MemberID,
>                             'fileName': filename
>                         }
>                     };
>                     $scope.showError = function (error) {
>                         var errorPopup = $ionicPopup.alert({
>                             title: JSON.stringify(error),
>                             template: '<p class="padding">Please try again later.</p>'
>                         });
>                         errorPopup.then(function (res) {
>                             $scope.submitComplete();
>                         });
>                     };
>                     $cordovaFileTransfer.upload(url, targetPath, options)
>                         .then(function (result) {
>                             //console.log("Response: " + JSON.stringify(result.response));
>                             if (result.response == 'Upload error!') {
>                                 $scope.showError(result.response);
>                             } else {
>                                 $scope.progressval = 0;
>                                 uploaded++;
>                                 $scope.sequential(uploaded);
>                             }
>                         }, function (err) {
>                             console.log("ERROR: " + JSON.stringify(err));
> 	                        $scope.showError('Upload error!');
>                         }, function (progress) {
>                             $scope.maxval = progress.total;
>                             $scope.progressval = progress.loaded;
>                         });



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org