Forum

Thread tagged as: Question, Runway, Gallery

How do I store Gallery images in one folder per album on Amazon S3

I'm using the "in one bucket per album" image storage option in Perch Gallery, but S3 buckets appear to require explicit paths in config/buckets.php

How do I ensure new folders are created on S3 for each gallery album upload? Is it possible to set a default S3 bucket?

Brad Cerasani

Brad Cerasani 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The bucket you set here should work as a S3 bucket from your buckets list.

I don't think the dynamic buckets stuff will work with S3 - it very much predates that functionality.

Are there plans to add support for dynamic buckets with S3?

I have a website with 232 albums (~80,000 photos), and putting them all in one flat directory sounds very unappealing.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's not really so much about S3, as the location for creating new buckets that aren't defined in the bucket list. If you use a bucket name that isn't otherwise defined, it gets created as a child of perch/resources - that's the behaviour that Gallery takes advantage of to give you dynamic buckets.

So back to one of my original questions then: is it possible to set a 'default' bucket?

i.e. Manually managing buckets.php is counterintuitive IMO. I'd like to be able to define a S3 bucket and have that behave just as perch/resources behaves OOTB. New Perch 'buckets' would be created automatically as directories within the S3 bucket, and all assets are effectively moved off of the website server and onto S3.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, nominating a bucket as the default is definitely on our list.

Great. Is it a feature you're expecting to release in the next version, or far future?

Drew McLellan

Drew McLellan 2638 points
Perch Support

All I know at the moment is that it's in the backlog. My gut feel is that it's a small amendment, and therefore should be easy to add into 2.9, but until I get back onto 2.9 development, I can't say for sure.

Is this still on the table for 2.9?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Yep, it's on the list.