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

always upload private files to s3 #17

Open
dongennl opened this issue Nov 25, 2012 · 2 comments
Open

always upload private files to s3 #17

dongennl opened this issue Nov 25, 2012 · 2 comments

Comments

@dongennl
Copy link

hi, thanks for this, it has helped me a lot

question about s3 security; I want all uploaded files to be secure (i.e. not publicly accessible). I have a helper to generate the secure URLs

I think it is related to this line in the code:

{'acl': '#{options[:acl]}'},

Is there a value I can set this to permanently that will upload all files as private? I tried 'private' but got an error from s3:

AccessDeniedInvalid according to Policy: Policy Condition failed: ["eq", "$acl", "private"]

guess i don't fully understand acl...

many thanks for any input.

@ncri
Copy link
Owner

ncri commented Nov 25, 2012

Hi there, normally "private" should work. Anyway, I don't support this code anymore. Have you tried the s3_direct_upload gem? It's much easier to use then this. github.com/waynehoover/s3_direct_upload. If setting the acl doesn't work there, you can submit an issue there.

@dongennl
Copy link
Author

thanks!

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

No branches or pull requests

2 participants