6

Is it possible to have an asset source pointing to a non public S3 bucket? Maybe also with expiring link urls?

1
  • +1. I would love to see this, as I'm starting to use Craft as a system where I can use the content for other apps via an API, and some content needs to be private...
    – patcoll
    Commented Dec 9, 2015 at 14:47

1 Answer 1

6

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.

3
  • 1
    Ok, I think I am looking for this S3 feature. It would be nice too see this integrated into Craft.
    – Lars Bilke
    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.
    – Neal Magee
    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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.