Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: modify S3 result storage path to make for easier deletion #148

Open
karptonite opened this issue Oct 15, 2020 · 2 comments

Comments

@karptonite
Copy link

For results storage in s3, the url for the requested image is translated directly into a storage path. This works fine, until you want to delete an image and all of its sizes, but don't know all the sizes you may have generated for that file. There is no fast way to search s3 for a filename if you don't know what folder it is in.

I have a suggestion for an option for making deletion easier. Say you request an image with the path:
/UeaoGZaXaFY1PO3d-EQIBjpy5jI=/576x324/filters:strip_icc()/pic2212632.jpg
Right now, it will go into s3 with the identical folder structure:
/UeaoGZaXaFY1PO3d-EQIBjpy5jI=/576x324/filters:strip_icc()/pic2212632.jpg
I propose prepending the filename to go an additional folder deep:
pic2212632.jpg/UeaoGZaXaFY1PO3d-EQIBjpy5jI=/576x324/filters:strip_icc()/pic2212632.jpg
Then, when it comes time to delete this image, you can just delete everything recursively in the folder pic2212632.jpg.

I may work on this in a branch myself, but with the coming move to Python 3, I'm not sure that it is worth trying to bring this back to the main repo, or if it is even a feature others would be interested in.

Any thoughts?

@Bladrak
Copy link

Bladrak commented Oct 27, 2020

Hi, we've set this up previously to optimize fetching performances in S3 (it was in the official AWS architects recommandations back when we set up the project). Since then, this may have changed, but TBH I don't really have time to look it up.

@kg-currenxie
Copy link

Would love this as well! This could possibly be a small deal-breaker when having to delete account information due to GDPR etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants