12-17-2019, 03:00 PM
Hi, IWFileUpload has propertie: ButtonVisible, it is True?. When you click in his button, they show you to select file, when you selected the file, iwfileupload upload your file automatic. After upload, iwfileupload fire AsyncUploadCompleted. You can create your folder, save your file, etc there.
Code:
procedure TIWForm.IWFileUploader1AsyncUploadCompleted(Sender: TObject;
var DestPath, FileName: string; var SaveFile, Overwrite: Boolean);
var
CurDir: string;
begin
// get the app path
CurDir := TIWAppInfo.GetAppPath;
// save in the same application directory, with the same name of the original file. Overwrite if it already exists.
IWFileUploader.SaveToFile(FileName, CurDir + FileName, True);
// Inform IWFileUploader that we are taking care of file saving ourselves
SaveFile := False;
end;