Hi Shai,
My app is trying to upload files to OneDrive through REST API. It works fine with small files, but it throws some memory or Heap Space errors when uploading large files in Android. Soon I have found that it is the problem of RetryableOutputStream, and the fix is to add header "Transfer-Encoding: chunked" to the request.
It stops the above error but deduce another set of problems:
For Android, the large files can be uploaded successfully, but when it finishes uploads, it prompts "Read timed out" Exception. If I press "retry", it will overwrite the uploaded file with 0 bytes; otherwise if I press "cancel", everything looks alright.
For small files, there is no problem at all.
For iOS, it gives "request timed out" for large files but the file have not been uploaded.
For small files, it gives "400 Bad Request" error.
The differences in behaviors make me confused and I don't know what the problem is. Could you shed some lights on this issue? Thank you.