benjreinhart / react-native-aws3

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

pre-signed url? #61

Open YousefMohsen opened 6 years ago

YousefMohsen commented 6 years ago

is it posible to upload with a pre-signed url ?
If not, it would be awesome you could implement that feature.

http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html

arapocket commented 6 years ago

Yeah, don't want to leave my keys hardcoded anywhere.

abhionlyone commented 6 years ago

@benjreinhart Any idea of implementing this?

arapocket commented 6 years ago

Anyone else have a solution for this? Is there something like dotenv for react-native at least?

husseinraoouf commented 5 years ago

+1

fozzarelo commented 5 years ago

+1

CrackyStudio commented 4 years ago

I'm interested about using presigned url too because keys are exposed if used by this package way :/

MayoudP commented 4 years ago

Still nothing ?

dylan-westbury commented 3 years ago

Anyone have a solution for uploading via presigned url?

I use a lambda to generate and return to client, but not sure how to upload with it, in particular for react-native-background-downloader

fozzarelo commented 3 years ago

@MayoudP, @dylan-westbury: guys, there haven't been too many changes to this repo in the last year. & this conversation went stale a while ago. I liked this lib because it's robust, nice and simple, but if you need presigned urls I suggest you move on. I recommend you convert your pic to a blob and send it to s3 via a regular PUT call. dm if you need help w/that.

MayoudP commented 3 years ago

I recommend you convert your pic to a blob and send it to s3 via a regular PUT call. dm if you need help w/that.

Unfortunately, I can't, I tried several librairies, but every time, when using the pre signed URL I received, I'm getting this error (was working well on RN 0.59.x and fail on RN 0.61.x :

"<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>EntityTooLarge</Code>
<Message>Your proposed upload exceeds the maximum allowed size</Message>
<ProposedSize>2025220</ProposedSize>
<MaxSizeAllowed>2023115</MaxSizeAllowed>
<RequestId>{...}</RequestId>
<HostId>{...}</HostId>
</Error>"

Was hoping this lib could help me ahah ^^'

talhafayyaz12 commented 3 years ago

+1 if this is implemented it would be great.