1

Background:

drupal 8.4.2

custom media solution

Issue

I can not delete files permanently which created as media entity.

Reproduce

  1. Created an image media entity.
  2. /admin/content/files claims status permanent and used in 2 places.
  3. After deleting newly created media entity from UI /admin/content/media.
  4. /admin/content/files says status permanent and used in 1 places.

Even cron run after 6 hours (as described in file settings) file still exist on the server.

Is there any safest or best way to delete those unused file permanently?

  • Does it exist in an entity revision somewhere? Was the media entity deleted? – Kevin Jan 3 '18 at 16:12
  • @kevin Yes i confirm media entity deleted. Though it works before drupal core 8.4 .* release. As unused files status changed to temporary and used in 0 places and after cron run 6 hours it delete the file. After 8.4.* default file setting of make_unused_managed_files_temporary set to false. – Mudassar Ali Jan 3 '18 at 16:13
0

You have to delete old versions of entities (articles etc.) where you used the files for the files to get the "used in 0 places" under /admin/content/files. After that status should be changed to temporary with option make_unused_managed_files_temporary set to true.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.