I am working on an upload script.
If a user uploads a file and it already exists I want to warn the user (this is all through ajax) and give them the option to replace it, or cancel.
Instead of moving the file, I was curious if I could just leave the file in tmp and pass back the path to that file in the ajax response.
If they user says overwrite the old file in that ajax request pass the path back to php which continues to work on the file.
For this to work however I need to know how long a file stays in php's tmp dir