FileTransfer returning error code null with cordova 3.0.0

FileTransfer returning error code null with cordova 3.0.0

Content Index :

FileTransfer returning error code null with cordova 3.0.0
Tag : file , By : vitorcoliveira
Date : November 25 2020, 07:22 PM

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

Cordova/Phonegap FileTransfer.upload() error code = 1 (FILE_NOT_FOUND_ERR)

Tag : javascript , By : user183345
Date : March 29 2020, 07:55 AM
should help you out Serverside script was wrong... naturally I should have figured that out given the obvious FileTransferError.FILE_NOT_FOUND_ERR error message. Apologies for wasting everyone's time and thank you for making the effort.

Cordova fileTransfer works perfect on iOS, throws error code = 1 on Android

Tag : android , By : Jack
Date : March 29 2020, 07:55 AM
it helps some times I'm developing a mobile app for iOS and Android using Cordova and Ionic Framework. There needs to be 'Send Photo' and related functionality, and I'm using Cordova's FileTransfer to do this. , Maybe late but I've kinda fixed it.
In my view file I use:
<input id="file" name="file" type="file" onchange="angular.element(this).scope().addFile(this)" class="upload" accept="image/*" capture="camera"/>
$scope.addFile = function(item){

        function uploadComplete(evt) {
            /* This event is raised when the server send back a response */
            $scope.imgId = JSON.parse(evt.target.responseText).data;
            $http.post($rootScope.baseServerUrl + 'Members/changeAvatar', {attachment_id: $scope.imgId}).success( function (response){
                $scope.User.attachment_id = $scope.imgId;
        function uploadFailed(evt) {
            alert("There was an error attempting to upload the file.")
        var updateImage = function (element) {
            $scope.$apply(function() {
                $scope.theFile = element.files[0];

                var formData = new FormData();
                formData.append("file", $scope.theFile);

                var xhr = new XMLHttpRequest()

                xhr.addEventListener("load", uploadComplete, false)
                xhr.addEventListener("error", uploadFailed, false)
                xhr.open("POST", $scope.baseServerUrl + "media/Attachments/add")
                $scope.progressVisible = true


Cordova's FileTransfer Writing Error (Code 1)

Tag : javascript , By : bdurbin
Date : March 29 2020, 07:55 AM
wish of those help The problem was caused by an upgrade of Cordova from a previous version.
The path of local files was not properly identified: .fullPathis now obsolete and should be replaced by .toURL().

Cordova Android Filetransfer returning null

Tag : cordova , By : Daniel Reslie
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further Turns out this was that kit kat version bug that was happening for a while. i restricted my version of android to 21, and all my woes went away.
thank you @aorfever for your answer, it is exactly what i was doing, but ended up being something out side of the actual functions i was calling that was the issue!

File upload error code 1 in ng-cordova filetransfer plugin

Tag : angularjs , By : user118656
Date : March 29 2020, 07:55 AM
will help you Finally this simple solution works for me.
UPDATE After Changing the Code in App controller and Webapi Controller Every thing working like a charm and images are start saving on server via API.
 uploadOptions.httpMethod = "POST";
                    uploadOptions.headers = {
var httpPostedFile = HttpContext.Current.Request.Files["file"];
Privacy Policy - Terms - Contact Us © scrbit.com