S3 with non-public, pre-signed URLs? #3146
-
|
Hi! Does Lychee support loading media from S3 if the bucket isn't open for public access? I'm using Wasabi as my bucket provider. They heavily discourage using public buckets. I've tinkered with this a bit... When I upload a photo to Lychee, it processes the photo and pushes the different scaled assets to my Wasabi bucket. But when I try to view the photo in Lychee, it tries to load the assets as if they were public (without pre-signing the URLs.) Just wondering if there's a config flag I missed for this. 🙂 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
Looking at the code: |
Beta Was this translation helpful? Give feedback.
-
|
@ildyria Thanks for the pointers... I checked my config and I did some debugging and it looks like there's a problem in Lychee/app/Models/Extensions/HasUrlGenerator.php Lines 47 to 53 in 98dbddf This condition is always evaluating true, so the pre-signed S3 URL is never returned; only the public-style S3 URL. Swapping the |
Beta Was this translation helpful? Give feedback.
Okay, yep:
This lets me serve pre-signed URLs from S3. I'm not sure what the relationship is between this and pre-signed S3 URLs, but it's working. Thanks!