Ionic file transfer upload always returns an error


#1

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 ??


#2

Who is giving you these errors? Your server?


#3

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


#4

What do these codes and states mean?


#5

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


#6

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