Drupal Answers Asked by Maxo on February 17, 2021
make_unused_managed_files_temporary
didn’t work for me.
I am using Drupal backend for the REST API frontend application.
Thats how the File input looks (because I am not sure if that setting is for that File elements, but guess so).
I read some informations about permanent files deleting, because I would like to delete files permanent from the file system and also database.
I was set the make_unused_managed_files_temporary
to true
and debuging, this is really true in the code.
I also found the configuration in Backend / File system
– Delete temporary files after (6 hours), so this is on.
I am checking also the database file_managed
before and after (and after 6 hours) file deletion for the flags like status
that indicates isTemporary()
method. But after uploading file, saving… then editing, and removing file, the file is still in the database as a status 1.
I am also checking DB table file_usage
where there is still the item with count=1
too, that should be not true (because of deletion).
And files maybe should move to /tmp folder, but that doesnt.
I am working on Drupal 8.5.6 and 8.7.2 on production, but the behaviour is the same.
I am doing something wrong? Is there some cron to be configured? Or another futher settings?
Edit 1: I think it is not a Media, but simply file widget – /core/module/file
Edit 2: The main problem is that, when I delete file, it stay in the database as a permanent flag (status=1
), and also it has a count of usage 1 (file_usage=1
). When I manually update database to set status=0
and count=0
, the cron works OK. Why the file usage and count stay on?
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP