Page 1 of 2
Multiple File Uploads
Posted:
30 Jul 2014 16:10
by aknapple
When using multiple file uploads how can you tell the last file has been uploaded?
Thanks,
Allen
Re: Multiple File Uploads
Posted:
30 Jul 2014 16:16
by Jorge Sousa
Hello Allen
As you can see in the
documentationyou can use the property FileUpload.FileNames
FileUpload.FileNames.Names[i] contains the upload name, and FileUpload.FileNames.ValuesByIndex[i] the output complete path.
Re: Multiple File Uploads
Posted:
30 Jul 2014 16:16
by Jorge Sousa
Hello Allen
As you can see in the
documentationyou can use the property FileUpload.FileNames
FileUpload.FileNames.Names[i] contains the upload name, and FileUpload.FileNames.ValuesByIndex[i] the output complete path.
Re: Multiple File Uploads
Posted:
30 Jul 2014 16:59
by aknapple
I don't understand how. Can you give me an example? I am looking for a way to know the entire upload is complete. I was looking for something like an OnDone event. OnComplete doesn't work because it gets called for each file downloaded. There is nothing to tell me it's the last file. I'm not sure how having the list of filenames and paths helps because I don't know how many files the user is going to select.
Thanks,
Allen
Re: Multiple File Uploads
Posted:
30 Jul 2014 17:19
by Jorge Sousa
Hi
Check the JQueryDemo_V2 in the upload frame
Re: Multiple File Uploads
Posted:
04 Aug 2015 23:50
by DidierL
Hi,
I have the same need for a final OnComplete event.
I've dig throught the demo code with no response, this code is executed for each file.
So one must maintain an external index to avoid processing several time the same.
Thank you if you can provide a simpler solution.
Re: Multiple File Uploads
Posted:
05 Aug 2015 00:05
by DidierL
Or maybe show I use UploadingFileList property?
Re: Multiple File Uploads
Posted:
05 Aug 2015 09:28
by Alexander Bulei
Hi DidierL,
You can use the follow code:
delphi code
procedure TIWForm3.IWAppFormCreate(Sender: TObject);
begin
IWCGJQFileUpload1.JQFileUploadOptions.OnComplete.Condition:= Format('(%s_JQObj._uploadingList._filelist.length == 0)',[IWCGJQFileUpload1.JQHTMLName]);
end;
The OnComplete event will fire only when finish the last file upload.
Topic:
viewtopic.php?f=40&t=2397Best Regards.
Re: Multiple File Uploads
Posted:
05 Aug 2015 22:24
by DidierL
Thanks!
It is really powerful.
Re: Multiple File Uploads
Posted:
17 Jul 2019 07:57
by zsleo
The code appears to be incorrect. Please advise correction
- Code: Select all
procedure TIWForm3.IWAppFormCreate(Sender: TObject);
begin
IWCGJQFileUpload1.JQFileUploadOptions.OnComplete.Condition:= Format('(%s_JQObj._uploadingList._filelist.length == 0)',[IWCGJQFileUpload1.JQHTMLName]);
end;
Also, How can I display an error message from within the IWCGJQFileUpload1BeforeSubmitEx event