Prevent overwriting existing files when uploading files
Posted: Thu Aug 12, 2021 1:29 pm
If server side exists a file "example.doc", and you try to upload a file with the same name "example.doc", then your uploaded file will overwrite the old one, so how to prevent it? You just need a simple Lua script for the FTP/SSH/HTTP event "BeforeFileUploaded":
Code: Select all
if c_FileExist("%PathName") == true then
bCancelEvent = true
end