Modification already indicated several times
use the event with this formulation in hfs.events
[upload name]
rejetto-%item-name%
in upload results list, all file are renamed as 'rejetto-name.ext', BUT in the folder list you find the original name 'name.ext'.
Where is the bug ?
Me, I know where.
// see if an event script wants to change the name
s:=eventToFilename('upload name', []);
if validFilepath(s) then // is it valid anyway?
begin
if pos('\', s) = 0 then // it's just the file name, no path specified: must include the path of the current folder
s:=f.resource+'\'+s;
// ok, we'll use this new name
data.uploadDest:=s;
fn:=extractFileName(s);
//from here, the new name is never assigned to data.f^, when numberFilesOnUploadChk is not checked
end;
// if not numberFilesOnUploadChk.checked then exit; wrong line
if numberFilesOnUploadChk.checked then
begin
....
end;
assignFile(data.f^, data.uploadDest);
end; // getUploadDestinationFileName
It is quite small nothingness which makes a big difference