6

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

  • +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 Dec 9 '15 at 14:47
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.

  • 1
    Ok, I think I am looking for this S3 feature. It would be nice too see this integrated into Craft. – Lars Bilke Jun 13 '14 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 Dec 29 '15 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. – Jonathan Melville Apr 27 '16 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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