adonis-storage icon indicating copy to clipboard operation
adonis-storage copied to clipboard

Set upload file properties

Open ankitchauhan477 opened this issue 7 years ago • 1 comments

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.

ankitchauhan477 avatar Jul 20 '17 06:07 ankitchauhan477

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'})

mikehhhhhhh avatar Oct 20 '17 10:10 mikehhhhhhh