CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Clear the uploaded file list

by fcoalvarado » 04 Nov 2013 03:46

Do you have an example of how to clear the list of files uploaded in JQFileUpload? I've tried
IWCGJQFileUpload.FileNames.Clear;
for i := 0 to IWCGJQFileUpload.FileNames.Count - 1 do
IWCGJQFileUpload.FileNames.Delete(i);
IWCGJQFileUpload.JQFileUploadOptions.ShowUploadedFileList := False;
but the list keep showing below the button.
Best Regards
Francisco Alvarado
fcoalvarado
 
Posts: 12
Joined: 14 Aug 2013 01:57

by Alexander Bulei » 04 Nov 2013 11:03

Hi fcoalvarado,

Call

Code: Select all
IWCGJQFileUpload.JQFileUploadOptions.ClearStoredFiles;


To clear in Browser side.

and

Code: Select all
IWCGJQFileUpload.FileNames.Clear;


To clear in Server side.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3637
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by asp » 07 Mar 2014 14:26

Hello!

Consider the scenario when an user may upload single file only. So, I would clear the file list if the user decided to upload another file instead of the previously uploaded one.
How to clear the list of uploaded files before new upload starts?
I tried to call JQFileUploadOptions.ClearStoredFiles in JQFileUploadOptions.OnSubmit.OnEvent handler, but it clears the file list after the upload process complete.
asp
 
Posts: 235
Joined: 06 Dec 2013 11:17
Location: Moscow, Russia

by Jorge Sousa » 07 Mar 2014 18:50

Hello asp

Please specify what list are you talking about? The visual list on the browser? The internal list on the browser? The list on the server?
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by asp » 11 Mar 2014 08:51

Hi!

The visual list on the browser
asp
 
Posts: 235
Joined: 06 Dec 2013 11:17
Location: Moscow, Russia

by asp » 11 Mar 2014 10:55

Sorry, it was my fault :oops: . If set JQFileUploadOptions.Multiple := false, then it will definitely clear the file list when another file is selected.
asp
 
Posts: 235
Joined: 06 Dec 2013 11:17
Location: Moscow, Russia

by Jorge Sousa » 11 Mar 2014 10:59

Hi

Ahh, ok, glad you found it :)
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to JQFileUpload

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.