openfoodfacts/openfoodfacts-server

Move all images to the deleted folder when product is deleted without deleting individual images first

Open

#9,794 建立於 2024年2月13日

在 GitHub 查看
 (8 留言) (1 反應) (0 負責人)Perl (477 star) (236 fork)batch import
good first issue👮 Moderation

描述

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.

貢獻者指南