08-05-2020, 07:55 PM
(08-05-2020, 04:58 PM)brsoft Wrote:(08-05-2020, 03:03 PM)Lorbass Wrote:(08-03-2020, 07:14 PM)Jose Nilton Pace Wrote: Hi. Select your IWImageFile, Properties, ScriptEvents, OnClick:
Code:IW.FileUploader("IWFILEUPLOADER1").selectFile();
Hi and thanks for the answer to Robert because I want to do in the same way!
BUT Delphi generates an error: E2242: 'FileUploader' is not a name of a unit
Something wrong?
Best regards and thanks for answer
Lorbass
Hi
In javascript, use the name of the TIWFileUploader component on the Form.
More info:
The onAsyncUploadCompleted event of the TIWFileUploader component works only in visible mode.
Currently this code (but I'm still trying to fix it):
UPL: TIWFileUploader; // UPL visible: false
// IWImageFile ScriptEvents "onclick": 'IW.FileUploader("UPL").selectFile();'
...
procedure TModifyConfig.UPLAsyncSelectFile(Sender: TObject; EventParams: TStringList);
begin
UPL.Visible:=True;
end;
...
procedure TModifyConfig.UPLAsyncUploadCompleted(Sender: TObject; var DestPath, FileName: string; var SaveFile, Overwrite: Boolean);
begin
[... fájl műveletek ...]
UPL.Visible:=False;
end;
...
Many thanks for answers!
In Version 15.2.10 it works fine - also if FileUploader is invisible!
The way to success is always under construction ... but i see a light at the end of the tunnel

