Getting rid of unused attachments

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
arpowers
Forum Commoner
Posts: 76
Joined: Sun Oct 14, 2007 10:05 pm
Location: san diego, ca

Getting rid of unused attachments

Post by arpowers »

Hey guys,
quick question.

I you allow users to attach a file to a post, then they navigate away from the page, what is an easy way of getting rid of the unused files?

Thanks!
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Getting rid of unused attachments

Post by Christopher »

Put the uploaded files in a holding directory until they complete the post. Use a cron to delete files out of the holding directory.
(#10850)
Post Reply