feat(backend): products and categories point at the media library (platform-v2 step 5.2)
- products.media_id / categories.media_id (Alembic 0027): the old
/static/product_images photos are processed into the library (named after
their product; missing or unreadable files logged and skipped; the old
folder is left on disk) and products.image_url goes. The static mount is gone.
- APIs give `image` {id, name, thumb, card, full}; a product's image_url is its
card size. media_id on create/update (null clears); media.not_a_picture for
a video. POST /api/products/{id}/image is gone: uploads go to /api/media.
- Products and categories register their media usage: a photo in use can't
be deleted.
- Media: AVIF pictures (Pillow 12.3), GET /api/media/{id} gives each stored
size's bytes and resolution and the uploader's name; upload processing moved
into services/media.ingest (also used by the data move).
- QR menu photo push (contract C-3): the library's card size, WebP.
- tests: test_product_photos.py (7, incl. the 0027 data move); 497 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -129,11 +129,12 @@
|
||||
},
|
||||
"media": {
|
||||
"not_found": "Το αρχείο {{media_id}} δεν υπάρχει στη βιβλιοθήκη πολυμέσων.",
|
||||
"type": "Ανεβάστε εικόνα (JPG, PNG, WebP ή GIF) ή βίντεο (MP4 ή WebM).",
|
||||
"type": "Ανεβάστε εικόνα (JPG, PNG, WebP, AVIF ή GIF) ή βίντεο (MP4 ή WebM).",
|
||||
"too_big": "Το αρχείο είναι πολύ μεγάλο (έως {{max_mb}} MB).",
|
||||
"too_many_pixels": "Η εικόνα είναι πολύ μεγάλη (έως {{max_mp}} megapixel).",
|
||||
"unreadable": "Αυτή η εικόνα δεν διαβάζεται. Αποθηκεύστε τη ξανά ως JPG ή PNG και ανεβάστε τη.",
|
||||
"in_use": "Αυτό το αρχείο χρησιμοποιείται από: {{uses}}. Αφαιρέστε το πρώτα από εκεί."
|
||||
"in_use": "Αυτό το αρχείο χρησιμοποιείται από: {{uses}}. Αφαιρέστε το πρώτα από εκεί.",
|
||||
"not_a_picture": "Εδώ διαλέξτε εικόνα, όχι βίντεο."
|
||||
},
|
||||
"caller_id": {
|
||||
"key_invalid": "Το κλειδί του τηλεφωνικού κέντρου λείπει ή είναι λάθος."
|
||||
|
||||
Reference in New Issue
Block a user