apache / cordova-plugin-file-transfer

Apache Cordova File Transfer Plugin
https://cordova.apache.org/
Apache License 2.0
596 stars 888 forks source link

Updated README for Android file uploads. #198

Closed shamilovtim closed 5 years ago

shamilovtim commented 6 years ago

Platforms affected

Android

What does this PR do?

Updates the README to address Android quirks with upload functionality. Saves people some time.

What testing has been done on this change?

N/A

shamilovtim commented 6 years ago

I know the plugin is deprecated but in case anyone is still using it or intends to use it for whatever reason this little blurb in the README will save people a lot of time and trouble I think.

janpio commented 5 years ago

Can you provide some context? Is this true for all upload or just for some configuration? What happens if one doesn't set the option?

shamilovtim commented 5 years ago

@janpio Thanks for your answer. I was trying to send a simple .jpg avatar from an Android application to our Flask REST API. This was succeeding without a clear error but no image resulted on the server. After lots of headache, I discovered it was this variable. At the time I could have explained better. However this link seems to describe the issue: https://stackoverflow.com/questions/12071266/how-do-i-explicitly-disable-chunked-streaming-mode-for-http-connections-in-andro.

It seems this is related to POST requests?

If the variable is not set, it seems as though the request completed but it did not. And checking the server shows the image was never actually transferred.

shamilovtim commented 5 years ago

Further research leads me to believe that this is an issue with Flask rather than Android. Closing

janpio commented 5 years ago

Thanks for following up, was suspecting something like this.