Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to presign #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sebringj
Copy link

@sebringj sebringj commented Mar 5, 2017

Send networked presigned from server to avoid having to set secret and also have programatic control over user's namespace.

Send networked presigned from server to avoid having to set secret and also have programatic control over user's namespace.
@YousefMohsen
Copy link

It would be awesome if this important feature gets implemented in the library!
@sebringj ; where do I set the presigned url? in options as presigned? and have you tested it, does it work?

@sebringj
Copy link
Author

sebringj commented Nov 7, 2017

@YousefMohsen hi, to get a presigned url, you can use this to get you started: https://github.com/sebringj/siggy what you do is in your code is just in time request to get this presigned one, then proceed with upload passing in presigned header. You'll have to modify this repo to inject the right headers for your security along with modifying the example code to check the header for a token or whatever security thing you are doing to ensure the user is signed in. My code is proprietary otherwise would give put up for you to use. My stuff is in production and works but doesn't do you any good, sorry but hope this gets you going.

onPress={() => getPresignedUrl()
.then(signingInfo => doUpload(signingInfo))
.then(done)}

type scenario

@YousefMohsen
Copy link

Im using the aws-sdk s3.getSignedUrl('putObject',params,callback) to generate presigned urls. I just cant figure out how to use that url to upload files in proper format. I tried to use axios and it uploads to the bucket, but saves the image as a json object..
Anyways thanks for your help:) and i hope to see the presigned url feature in the RNS3 library one day.

@arrygoo
Copy link

arrygoo commented Apr 18, 2018

hey @sebringj , I made a fork of this package and merged your PR for myself. One question though. I'm seeing that you're passing signature as one of your parameters. How do you get that?

I'm using aws-sdk-js on my server to generate the signedUrl, which returns a full url including the signature. Do you strip it from there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants