Reputation: 30698
I'm working on a website which is starting to generate a large volume of user-uploaded photos, which are then converted into multi thumbnails of different sizes and stored. So far, these have been stored locally but I would like start storing and serving them via Amazon S3.
I've read Amazon's bucket and file naming rules which are clear, but I am wondering if there are other practical best practices for future maintainability.
Until now, I've been doing this:
... where the the path is derived from the GUID and the image filename from the timestamp. This distributes files without creating massive folders, keeps everything sufficiently unique, and makes it possible for images to be matched against a GUID even manually. It's worked well so far.
With S3, I'll probably be serving these images from a single bucket but as the bucket cannot contain sub-folders, I'm curious as to how other people are storing large volumes of images. For example:
Am I over-thinking this? Any experience would be appreciated, thanks.
Upvotes: 3
Views: 479
Reputation: 993223
You can in fact use exactly the same naming scheme as you already have. The /
character is perfectly valid in an S3 object name, and means nothing more than any other character like .
or q
.
Upvotes: 3