flutter_uploader
flutter_uploader copied to clipboard
Azure Blob Storage upload fails on Android - with solution
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.