Neil: Yes.

Tim Starling wrote:
> On 24/09/10 10:00, Marco Schuster wrote:
>> If it's user-uploaded, take care of garbage collection; actually, how
>> does PHP handle it if you upload a file and then don't touch it during
>> the script's runtime? Will it automatically be deleted after the
>> script is finished or after a specific time?
> 
> It's deleted on request shutdown.
> 
> -- Tim Starling

If the file is not moved away, there's no point in storing its path in
$_SESSION as it won't be available on next request (it could be used for
parameter passing in globals but that's not proper style).

If the file is moved somewhere else, then you need to garbage collect it
in case the upload is never finished.
A find -delete from cron removing files other than a couple of days
could be enough.
It would be nice to be able to attach delete handlers to memcached keys
for the cases when there's "something more" that needs deleting (this is
the same problem we also had with the temp dbs for selenium tests).


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to