akeneo / pim-community-dev

[Community Development Repository] The open source Product Information Management (PIM)
http://www.akeneo.com
Other
954 stars 514 forks source link

Question: Removing old media files? #6167

Closed pardahlman closed 7 years ago

pardahlman commented 7 years ago

Hello team,

This question relates to 1.7.x CE.

I have a quite large list of products, each associating one or more media files. Over time images associated with the product will change and some images may end up not being used by any product. If I query the media-files endpoint I still see these images. That in itself is not a problem, in fact I think it is good design that they still show in the list all media files. However, it is desirable to be able to remove media files. Preferably I would like to remove the notion of the media file and the actual uploaded file. The reason for this is both to make it easy to navigate in the list of media files by removing files that are out of date, as well as saving space on disk.

I haven't found any way to do this through the API (which I understand is under development so perhaps it will be possible in the future?) or the GUI.

What is the intended work flow for removing old media files?

nidup commented 7 years ago

Hi @pardahlman

In fact, in Enterprise Edition, we can restore the previous version of a product and doing this, we can re-use a media not used anymore (only used by a past version of a product).

We discussed several times about the way to handle the cleanup of old media with the team and we conclude that we should implement a cleanup command (as we do with versions for instance). I don't have any ETA for this improvement.

Regarding the API, I don't know if we plan to add a endpoint to remove a file, maybe @ahocquard has more information regarding this :wink:

Best regards.

mickaelandrieu commented 7 years ago

Hello, as @NolwennP is the beloved product owner of the REST api, I think she could be interested to answer too.

Thanks for your feedback @pardahlman!

pardahlman commented 7 years ago

Thanks for your input @nidup and @mickaelandrieu

I've elaborated my thoughts on this topic here: https://github.com/akeneo/pim-community-dev/issues/6166#issuecomment-301445558. I think it might be something that @NolwennP might be interested in.

Cheers!

ahocquard commented 7 years ago

@pardahlman

Discussed with @NolwennP :this problematic concerns the PIM in general, so no ETA in the API for this endpoint for now.