automatic file-rename trigger on upload

  •  05-30-2011, 1:07 PM

    automatic file-rename trigger on upload

    Could you point me to the line of code to trigger an automatic rename if a file already exists upon upload?
     
    Currently:
    fileA.xxx exists on server, new upload of fileA.xxx overwrites original fileA.xxx
     
    What I'd like to see:
    fileA.xxx exists on server, new upload of fileA.xxx. User gets notified of duplicate filename and is requested to either OVERWRITE the original, RENAME the uploaded file to fileA-1.xxx or CANCEL the upload.
     
    or at the very least: 
    fileA.xxx exists on server, new upload of fileA.xxx gets renamed to fileA-1.xxx. User get's notified of the rename
    Filed under: ,
View Complete Thread