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
Creating an S3 signed URL without downloading the object #836
Comments
You can use Using s3.directories.get(BUCKET).files.head(object).url(expiry) Without touching S3: s3.directories.new(:key => BUCKET).files.new(:key => object).url(expiry) |
Wonderful. Thank you. |
@benmanns thanks for covering this, spot on info. |
Woah, thanks to mark fine for linking this issue. My app was surprise downloading huge things just to make a url, I had no idea. |
@will - fwiw, there is another way which avoids the head request also (if you can reasonably assume that the file exists). Happy to discuss or help out with any S3 stuff you might have going on, I have used it a lot, probably too much. |
@geemus this page comes up fairly easy when googling for signed URLs. if you know a better way, you should add a link to this thread... cheers! |
Hmm, hard to remember now. I think basically you can just do the second part above (with |
I'm using
fog
to generate signed URLs for S3, like this:This causes
fog
to download the entire object, which I don't need to do.Is there any way to create the signed URL without downloading the object?
The text was updated successfully, but these errors were encountered: