-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Uploading image to S3 using presigned URL fails on Android #425
Comments
@robindowling , thanks for reporting the issue, I'm not sure if this is caused by the problem mentioned in #389, on Android, the file path will need a scheme prefix like
|
Yes I noticed this, but I am compensating for it by concatenating strings instead of using |
Okay, but I think on Android the correct format would be like |
Ok, but I have tried this as well. Using the Do you possibly have a working example of this? Can I provide you with presigned URLs if you wanted to try it out and hopefully prove me wrong? 😌 |
@robindowling , I'd like to try it if possible 👍 Let's figure out what's happened. |
Thank you @wkh237 for being so forthcoming with this, much appreciated! As mentioned, I can send you presigned URLs for uploading to S3. However these URLs have a TTL and are usable once only so I'd rather not post them publicly. Should we continue our conversation over email? And then post a working solution in this thread if we are able to find one. |
@robindowling , no problem, let's continue this in the email. |
This issue has been verified which is caused by the Android native code where replace the |
I can confirm that the change in branch Kudos to @wkh237 for solving this issue within hours ✊🏼😃 |
Fixes the issue described here in relation to uploading to S3 wkh237#425
I have an implementation using
RNFetchBlob.fetch
that works flawlessly for iOS but always fails on Android, and I've been banging my head against this wall for a few days now.I am uploading an image to AWS S3 using a presigned URL. The presigned URL comes from my server and generates new URLs for each request. However, on Android S3 responds with
SignatureDoesNotMatch
. I have set permissions in myAndroidManifest.xml
as well as getting'granted'
back fromPermissionsAndroid.request
.This is a simplified version of my code. I removed event logging etc to make things clearer.
On iOS (device and simulator), as mentioned, everything works well.
On Android (simulator, Marshmallow 6.0, api 23), this produces the following output:
Keep in mind that it seems unlikely that there is something wrong with the generated URL since it works 100% on iOS and 0% on Android.
Does anyone know what I'm doing wrong here?
Does anyone have a working solution for uploading images from library and camera on Android to S3 using a presigned URL?
Thank you 😌
The text was updated successfully, but these errors were encountered: