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

Set upload file properties #7

Open
ankitchauhan477 opened this issue Jul 20, 2017 · 1 comment
Open

Set upload file properties #7

ankitchauhan477 opened this issue Jul 20, 2017 · 1 comment

Comments

@ankitchauhan477
Copy link

ACL - public read
contentType - image/jpg

because if we don't set contentType ... S3 take it as application binary octet ... so is there any way to pass contentType while uploading files. As well as public read for uploaded files.

@mikehhhhhhh
Copy link

I added a PR that enables just this as well as fixes some issues with newer S3 AZs quite a long time ago, @nrempel doesn't seem to have got around to merging or, or perhaps he's decided not to at all.

Feel free to checkout https://github.com/mikehhhhhhh/adonis-storage

There's an extra arg for put methods that takes an object passed directly to the S3 request, so you can do something like this;

yield Storage.putFile('/path/to/file', contents, {ContentType: 'image/jpeg'})

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