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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…