Closed userz58 closed 8 years ago
Pim\Bundle\CatalogBundle\Model\ProductValue: type: entity table: pim_catalog_product_value changeTrackingPolicy: DEFERRED_EXPLICIT indexes: value_idx: columns:
Hello @userz58,
What you try to achieve is already the normal behaviour on Akeneo PIM: When a media is removed from a product field, we keep it in the media table and keep it on the file system. We only break the relation between the product value and the media in database.
Did I miss something ?
Regards,
Julien
when you delete additional field - file will be deleted too.
Which version of the PIM are you using ?
1.4.8
I just checked on 1.4.12:
I go to a product with a media attached to it. I remove it and save the product.
The media is still on the mysql table and on the file system.
Could you update to try it ?
1 you open saved product. 2 add new media attribute (field) 3 upload image or pdf
5 remove attribute FIELD (click on cross icon) 6 save file will be deleted from DB
Hi userz58 !
I reproduced a part of the behaviour you described in the 1.5.1. When I remove the custom media attribute from the product the file is not removed from the file storage but it is removed from the database.
I added a ticket for this. Thanks for your feedback :)
I labelized this issue to Bug. You're very welcome to contribute and fix this bug, if you need help or if you have question don't hesitate to ask :)
Regards, Willy
Hello.
This bug has just been fixed on our 1.5 branch. It will be out with our next 1.5 patch coming this week.
Regards, Damien
i would like use HASH parameter to upload and save only unique files Akeneo\Component\FileStorage\Model\FileInfo Akeneo\Component\FileStorage\File\FileStorer
i have problem: when i click on media field on trash icon - file will saved in DB.
when i will add to product additional field "PDF description" (and upload file). if i will remove additional field - file will be deleted from DB.
where i can disable removing file when field removing?