flutter_uploader icon indicating copy to clipboard operation
flutter_uploader copied to clipboard

Azure Blob Storage upload fails on Android - with solution

Open ingokiem opened this issue 4 years ago • 0 comments

Hi there! The Android implementation changes the header – causing services like the Azure blob storage to reject uploads as the header is modified. The iOS implementation does not do this. In my opinion the header should only be set in the Flutter code.

Our solution was to just modify line 142 in UploadWorker.java:

innerRequestBody = RequestBody.create(file, contentType);

to

innerRequestBody = RequestBody.create(file, null);

Maybe this helps somebody.

ingokiem avatar Sep 17 '21 17:09 ingokiem