Is it possible to have an asset source pointing to a non public S3 bucket? Maybe also with expiring link urls?
1 Answer
Private buckets can be used, but files uploaded to them via the Craft CP will be given public read access. Expiring URLs are not built into Craft because the files being public.
-
1Ok, I think I am looking for this S3 feature. It would be nice too see this integrated into Craft. Commented Jun 13, 2014 at 21:01
-
Exactly. You could write a plugin, if needed, for storing objects in a private bucket and generating pre-signed URLs like you mention. Those are very useful. That might be nice to keep your private things private, and your public things public? But wouldn't make much sense unless you had a restricted portion of your site. Commented Dec 29, 2015 at 15:34
-
So yeah, super late on this one but I have written a plugin that does just this! It will return a signed URL for your S3 assets, allowing temporary access to private objects with an expiring URL. You can optionally force the file to download and even check for a logged in user before allowing the download to proceed. Commented Apr 27, 2016 at 12:26