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
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 –
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
count=0, the cron works OK. Why the file usage and count stay on?
2 Asked on March 2, 2021 by deinqwertz
1 Asked on February 28, 2021 by mohk
1 Asked on February 25, 2021 by plambre
1 Asked on February 22, 2021 by vipin-p
1 Asked on February 21, 2021 by hkguile
1 Asked on February 21, 2021 by bkudrle
2 Asked on February 20, 2021 by moto
1 Asked on February 19, 2021 by user101999
1 Asked on February 18, 2021 by chris-riddell
0 Asked on February 17, 2021 by maxo
2 Asked on February 15, 2021 by acanana
3 Asked on February 13, 2021 by saidbakr
1 Asked on February 12, 2021 by athakhan
3 Asked on February 11, 2021 by albertski
1 Asked on February 11, 2021
3 Asked on February 10, 2021 by szymon-panecki
1 Asked on February 8, 2021 by dupls
1 Asked on February 7, 2021 by leelandra
1 Asked on February 6, 2021 by lus
2 Asked on February 6, 2021 by quest
Get help from others!
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP