mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-11-05 20:52:48 -05:00
A Photo can now be an upload (source 'upload') with the file as sent kept privately in Active Storage. Its full size and thumbnail versions get keys under photos/ when the photo is created, so fullsize_url and thumbnail_url are known straight away and never change. PhotoUploadJob makes those versions with libvips: JPEGs no bigger than 1600px, and a 300px square thumbnail, with all metadata removed so a photo doesn't publish where it was taken. The date taken is kept on the photo, and the file as sent is deleted. Files that aren't images, or are over 50 megapixels, are deleted with their photo. The S3 service is now private. The bucket's policy should allow public reads under photos/ only. In development, files on disk are served by a small route that only shows those versions. Adds image_processing to the Gemfile (already in the lockfile), and libvips plus a spec/jobs step to CI. Assisted by Claude