Howdy...
I am trying to create a script which does following...
A user clicks on the form and selects the file to upload...
The script displays the uploaded file on the screen as soon as upload completes...
Simple enough, I guess...
That part is pretty much done and works properly...
Now, I need to add a cleanup routine... If 10 person uploads their files, I'll end up with 10 additional files and it could be 100s files in a matter of a day or two... and we don't want that...
Luckily, the files that are uploaded can be deleted as soon as the user's browser gets closed... That sounds like a good place to clean up that uploaded file, but I am sorta lost on that part...
So, I was thinking maybe I should really check if there is one day old file in the given directory and delete them if there are before I even open up the upload form... and I am pretty much lost on that part as well...
Can anybody give me some suggestion on this???
Thanks...
Jason