benjreinhart / react-native-aws3

Pure JavaScript React Native library for uploading to AWS S3
MIT License
398 stars 151 forks source link

File Upload Dont work in Android #103

Open bruno1pb13 opened 2 years ago

bruno1pb13 commented 2 years ago

On ios the upload works, but on android I get the following error

Possible Unhandled Promise Rejection (id: 27): Object { "headers": Object {}, "status": 0, "text": "Binary FormData part needs a content-type header.", }

in IOS

Object { "postResponse": Object { "bucket": "bucketname", "etag": "76cc2064fff35de674ec29c9khdgqdc79", "key": "8C8125E2-C184-4222-A1A8-C5B87EC03908.jpg", "location": "urlfile", },

govind-v-natex commented 2 years ago

Facing the same issue with android, please resolve this ASAP.

sanoopks commented 2 years ago

The issue commonly occurs if the type property in the S3 request payload is false. Can you guys check that you are passing the correct mime type in the request payload?

joumanam commented 1 year ago

I was having the same problem on android, I replaced type: "mp4" with type: "video/mp4" and it was resolved