Open dipth opened 3 years ago
Hi,
You just create a function and call it to process all files before deploying a new feature which uses these file sizes.
@achempion sure, but is there a function that can be called to generate this version or do I manually have to write code that downloads the original images from S3 and re-attaches them to regenerate all versions?
I looks like you can't process only one version for now and have to trigger cropping for all versions at once upon adding a new version.
What is the best way to regenerate a version for an attachment when having added a new version definition or changed an existing one.
For instance, let's say I have the following version definitions:
Supposed I've been having this running in production for a while and I now find out that I also need a
tiny_thumb
version, I would change the definitions to add:This will work fine for new photos uploaded after the change has been deployed, but existing photos will now fail when requesting
MyAppWeb.PhotoFile.url({@photo.file, @photo}, :tiny_thumb)
. So what would be the best way to traverse through all existing photos and create the missing version?