First: Thanks so much for Shrine, it’s been an amazing tool for my Ruby projects.
We are migrating a large project from Shrine 2 to 3, and switching over to the new Derivatives plugin.
When processing an uploaded file, we do keep the original files, but we still need to strip metadata/EXIF data from originals for legal reasons (because people do things like upload avatar images that contain their current coordinates in EXIF).
Attacher.derivatives block, will changes to the
original file be persisted correctly? There does not appear to be an officially documented way to adjust the original before handing it off to the Derivatives plugin. Would
Attacher#sequel_before_save possibly be the best place to do it?
While we could store the uploaded file, then call some kind of secondary process to strip and re-save the original each time, this isn’t ideal because we would still have had their potentially personal data in our possession for longer than the period of an HTTP request (and that process could get accidentally turned off, etc. Better to not build it if we can.)