adonis-storage
adonis-storage copied to clipboard
Set upload file properties
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.
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'})