jonsaw / amazon-cognito-identity-dart

Unofficial Amazon Cognito Identity Provider Dart SDK, to easily add user sign-up and sign-in to your mobile and web apps with AWS.
MIT License
204 stars 93 forks source link

upload image to s3 content-type still binary/octet-stream #44

Open BT5ZH opened 5 years ago

BT5ZH commented 5 years ago

set MediaType(image,png) in http.MultipartFile http.MultipartFile('file', stream, length, filename: path.basename(file.path), contentType: MediaType(mimeTypeData[0], mimeTypeData[1]))

doesnot work.

It seems to set something like " res.fields['Content-Type'] = 'image/png'; " but I am not familiar aws .

Please help out here! Thank you

Josue10599 commented 4 years ago

set MediaType(image,png) in http.MultipartFile http.MultipartFile('file', stream, length, filename: path.basename(file.path), contentType: MediaType(mimeTypeData[0], mimeTypeData[1]))

doesnot work.

It seems to set something like " res.fields['Content-Type'] = 'image/png'; " but I am not familiar aws .

Please help out here! Thank you

Were you able to change the metadata using the content-type? I am also experiencing this difficulty!

Josue10599 commented 4 years ago

I managed to solve this question, I uploaded the answer here: