Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
SJ77 Posted March 15, 2017 Posted March 15, 2017 If someone uploads a file and doesn't complete the posting, what happens to that file? Is there a mechanism running via cron that will clean up the mess and delete the file from my server?
Numbered Posted March 17, 2017 Posted March 17, 2017 When you upload attach to post, but not post your post - you attachment already saved in your storage. It can be located in your /uploads/ folder or other place, which you select in file settings (attachments block). So if user return to this topic - then he will see autosaved content of editor with his attachment. If user clean up his browser and return to topic - then he will not see his autosaved content or attachment. But his file stayed saved as his file. He can choose them from 'Insert other media' -> 'insert exiting attachment'. All attachments saved here. So you don't need worry about some unuseful garbage. User files is stayed as userfiles and they not lost by they. List of attachment you can find in 'core_attachments' database table. Try to load attachment without post message and you can see your file in this table and see path for them.
sudo Posted March 17, 2017 Posted March 17, 2017 They should be purged after x amount of hours defined in the admin area to be honest. If the user nevers ends up posting the attachment its wasted space. This would need to be a group based setting allowing admins to upload but not attache but not users.
Linguica Posted March 17, 2017 Posted March 17, 2017 The software has a task that runs every 12 hours that searches for any uploaded attachments that aren't actually attached to anything and deletes them. Search the AdminCP for "tasks" and you will see it listed. The actual file that controls it is at /applications/core/tasks/cleanupattachments.php
Linguica Posted March 17, 2017 Posted March 17, 2017 The same thing appears to happen with orphan files in the Downloads section once a day.
Joel R Posted March 18, 2017 Posted March 18, 2017 Nominating this for "Did You Know" tip of the week.
LiquidFractal Posted March 18, 2017 Posted March 18, 2017 6 hours ago, Joel R said: Nominating this for "Did You Know" tip of the week. +++++
Recommended Posts
Archived
This topic is now archived and is closed to further replies.