blueimp/jQuery-File-Upload — Issue #823: automatically change name if duplicate file
Author: scottybe
Created: 2011-11-29 22:47:51+00:00
State: open

I'd like to automatically change the name of the uploaded file (i.e. append an _1, _2, _3, etc.) if it already exists on the server. I think I see where the code were go, but how can I tell if the file already exists and the counter needs to be incremented OR if the file already exists and the the new file just needs to be appended?

In the php code, the variable $append_file is true if the file already exists and the size of the new file is less than the size of the file on the server, but won't that sometimes be true if the new file has the same as a file previously uploaded?

Thanks.