I’m using amazonica to upload a file to a bucket like so:
(s3/put-object “humboi-videos” “video1.mp4" “./resources/public/sample.mp4”)
The objects that are created are not publicly readable, and I want them to be publicly readable. How to do this? Secondly, how to programmatically access the object uri?
You need to pass :access-control-list {:grant-permission ["AllUsers" "Read"]
to put-object
@ps The URIs... as far as I remember , the public ones you have to construct yourself - the follow the same pattern as described here: https://docs.aws.amazon.com/general/latest/gr/s3.html For pre-signed, limited access urls (which are usually better solution than making objects public) you have to use the S3 SDK directly by using the GeneratePresignedUrlRequest
class
thanks @lukaszkorecki