Ionic FileTransfer from camera Error Code : 3 to server hosting

E-Place

I have code for upload image from camera to server (LOCAL) and it's work normally

fileTransfer.upload(imageData, 'http://192.168.0.100/profile/upload', options1).then((data) => {
                    // success
                    alert("Success");
                }, (err) => {
                    // error
                    alert("error"+JSON.stringify(err));
                });

and then I change the URL from local to hosting, but I get error like this

error {"code":3, "source":"file:///storage/...","target":http://mylink.com/profile/upload,"http_status":null,"body":null,"exception":"unexpected end of stream on com.android.okhttp_Address@51fa1429"

how to fix that?

E-Place

add chunkedMode: false in options. and code like this

let options1: FileUploadOptions = {
                    mimeType: 'multipart/form-data',
                    httpMethod: 'POST',
                    chunkedMode: false,
                   fileKey: 'file'
                }

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Ionic: Getting Error Code 3 when uploading image using ng-cordova fileTransfer and Camera plugin

Ionic 3 FileTransfer throws errorcode 1 for download

Cordova's FileTransfer Writing Error (Code 1)

Phonegap FileTransfer error code returns null

FileTransfer error code 1, Windows Phone 8.1

Laravel server hosting error

Python 3 - Hosting a server

How to download file from url in Ionic 5 without using FileTransfer

File upload error code 1 in ng-cordova filetransfer plugin

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

500 Internal Server Error Hosting

Error: Unreachable code detected ionic 3 weather app

Camera.getPicture is not a function in ionic 3

Firebase hosting Error 503 Varnish cache server

500 internal Server Error on Shared hosting

AJAX POST 500 Internal Server Error on hosting

Ionic 4 - Getting [ERROR] ng has unexpectedly closed (exit code 1) when I run "ionic server"

Code 3 when uploading file to S3 using FileTransfer in Phonegap on Android 4.3

Error from to code alternate using server?

hosting on webpack dev server accessing from parallels

Pull lost code from Firebase Hosting deployment

Symfony 3 shared hosting error 500

Ionic Vue 3 on subdomain on Firebase Hosting not finding index.html

Phonegap 3.4 FileTransfer error (iOS)

Typescript error ionic 3

Ionic 2 fileTransfer.download not reacting on iOS

Unable to download file in Cordova and Ionic with FileTransfer

Error While Trying to Display Value from Jsonobject in ionic 3?

How to get PWA installed from localhost without hosting using IONIC?