Ionic file transfer upload always returns an error

im always getting one of these errors even if the image is uploaded
These errors are from the file transfer upload console log .

{“code”:3,“source”:“file:///data/user/0/io.ionic.starter/files/amarimg.jpg”,“target”:“https://***s.me/petupload.php",“http_status”:null,“body”:null,“exception”:"state:
2”}

{“code”:3,“source”:“file:///data/user/0/io.ionic.starter/files/amarimg.jpg”,“target”:“https://***s.me/petupload.php",“http_status”:null,“body”:null,“exception”:"expected
1596 bytes but received 16384”}

any thoughts ??

Who is giving you these errors? Your server?

1 Like

Ionic file transfer, when I console log the error from the transfer, that’s what I get

What do these codes and states mean?

Code 3 means connection error, not sure what state means I couldn’t find anything online, I think the exception is forwarded from the android environment if I’m not mistaken

this issue has been solved here https://stackoverflow.com/q/47565020/2484276

1 Like