This event is added on request to stop uploading a file if , for some reason, you don't want to uplod is, for example if it already exists.
However the param "ATempPathName" hold a value like "'C:\Users\ADMINI~1\AppData\Local\Temp\01b8pv0gwr\ATZ35DF5FB18825.tmp" where the filename is "Boost.txt" and if i set the param "AHandled" to true of false, the file is still in UploadOptionsComplete event.
Added 24-2-2017:
Just checked the sourcecode:
- Code: Select all
LIsHanlded:= False;
if Assigned(FOnSaveFile) then
FOnSaveFile(Self,LFile.TempPathName,LIsHanlded);
So the "LFile.TempPathName" is what i get, where i need "Filename"
if AHandled = True, the file is not saved, which i tested and works fine
However i don't expect the file be present in the list of uploaded files in the UploadOptionsComplete event.
Also the file is made visible ( A set Handled to true for B4.png) so i don't expect that one to show up.
Eric