openfoodfacts/openfoodfacts-server
View on GitHubMove all images to the deleted folder when product is deleted without deleting individual images first
Open
#9,794 opened on Feb 13, 2024
good first issue👮 Moderation
Description
What
- Move all images to the deleted folder when product is deleted without deleting individual images first
Why
Code pointers
- Related code is in lib/ProductOpener/Product.pm + Images.pm
- To delete a product, you have to be an admin. Create a user in your local product opener website (use the Sign-in button), then in lib/ProductOpener/Config_off.pm add your userid.
- Removing an image is calling process_image_move with "trash" as destination
- Removing a product is about setting $product_ref->{deleted} to 'on', so image removal should happen in store_product, after initial checks, when we see it is deleted.