fluttercommunity / fluttercommunity/flutter_uploader

Azure Blob Storage upload fails on Android - with solution

Open
#200 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
218
Forks
172
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.