More dev notes

This commit is contained in:
Christoph Haas 2020-11-01 23:26:18 +01:00
parent 57c2af613c
commit b20ad877b5

View file

@ -87,3 +87,25 @@ AppStream data
user-generated: uploaded by a random user
upstream: official screenshot from the developer
logo: not a screenshot - just a logo
---
debshots used to use the 'paperclip' gem for file handling of images.
Paperclip was deprecated so something new was needed. At the same time
Rails 6.0 was released and offered file handling using ActiveStorage.
However ActiveStorage was so seriously flawed and incomplete in 2020
that I decided to go for the 'shrine' gem.
There is a Rake task that converts Paperclip attachments to Shrine attachments.
This is a one-time conversion.
Images are saved in four ways:
- original image
- thumb image (to be used in packages.debian.org)
- large image (original image with watermark on the right edge)
- medium image (up to 800x600)
- small image (up to 320x240) for gallery/grid views
Screenshot.image was the Paperclip image attachment.
Screenshot.simge is the Shring image attachment.
I used two different attributes to avoid confusion.