Android httpclient file upload data corruption and timeout issues

前端 未结 3 1573
说谎
说谎 2020-11-30 11:44

i\'m having issues with uploading images in android.

i\'m using apache httpmime 4.1 lib the code is like this:

MultipartEntity reqEntity = new Multip         


        
3条回答
  •  日久生厌
    2020-11-30 12:10

    I had the same corruption problem on 80% of my uploaded files. Emulator didn't fail to upload though. Corrupted files were 1k larger that original ones. Then I set the buffer of the output stream to 1 byte and it began to work with no problem. Finally I let it be 8 bytes and haven't had no more corruption problems. A buffer of about 80 or 50, I can't remember, also failed. Don't understand what the problem is but I'm happy it is working this way. This page was so inspiring thanks.

提交回复
热议问题