CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

a few questions

by davenovo » 14 Mar 2018 23:41

1. what is the difference between OnUpload and OnUploadComplete?

2. It seems that OnUpload and OnUploadComplete is fired for each file I upload (if multiselect is true). If I am uploading multiple files, how do I know which file triggered the event? In your demo application in CGFileUpload, in the case of multiple file upload, you populate the IWLabelStatus.Caption over and over again to the same value since its fired in the UploadComplete event and dont show how to know which file it was. That would have been a big help.

tiny point: the upload demo populates the status with the text 'downloaded' in TIWFileUploadFrame.TIWCGJQCustomFileUploadComplete
s:= s + ' downloaded:'+sLineBreak;
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by Alexander Bulei » 15 Mar 2018 12:11

Hi davenovo,

You can use the BrowserParams to pass the arguments.
On forum, you can find the information how to do it.

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: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by davenovo » 15 Mar 2018 16:40

Hello,

I just did a search for onUploadComplete on the forum and there is no information about browser params for this method.

Your demo also shows no example at all how to handle retrieving the name of which file was uploaded for each invokation of onUpload and onUploadComplete. I do not want to pass information in, I need to retrieve the information.

Also, please explain what is the difference between when onUpload and onUploadComplete is called. Is onUpload called at the start of uploading a single file, and onUploadComplete at the end of uploading of the file?
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by Jorge Sousa » 15 Mar 2018 19:15

Hi

onSubmit
Called when the item has been selected and is a candidate for uploading.

you can use Upload.JQUploadOptions.onSubmit.Script

and add

return false;

to cancel the update, but all must be done with javascript.

Every event that checks the response must be handled by script only.

onUpload
Called just before an item begins uploading to the server.

onUploadComplete
Called when the item has finished uploading.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by davenovo » 15 Mar 2018 19:20

Hello,

In the event of multiple files, does setting return false cancel just that file, or the whole upload?

If I want to abort the whole rest of the upload, do I just set a flag on my form and the check that flag and return false over and over, or is there a way to abort the whole thing.

If you would simply update your documentation with the information in this thread, it will save a lot of time in the future. How the heck was I ever supposed to figure out to use the JQUploadOptions.onSubmit.Script and even what to do with it? :D
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by davenovo » 15 Mar 2018 19:22

Also, if I select 5 files for uploading, I presume onSubmit will be called 5x. How do I know which file the onSubmit is for. Is that in the .Script as well?
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by Jorge Sousa » 15 Mar 2018 19:50

Yes its called the 5 times

About the script, it's only finding Upload.JQUploadOptions.OnSubmit.Script on the inspector

And about the documentation again, you've to realize that our work is adapting jquery plugins to intraweb.

Most (or all) part of the documentation is already done by the plugin makers.
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by davenovo » 15 Mar 2018 20:08

It is just quite confusing. Sometimes you guys expose properties (like the grid SelRows, SelRow) and other times it seems I have to use the Script, Params or otherwise to obtain the information I need. There is no documenation of what the "proper" way to do it for different scenarios. So I end up fishing around for properties that look usable, params the look usable. I have never noticed nor used the .Script before. I dont remember is in any of in the demos I have seen (certainly its not in the uploader demo), so I feel like I have to fight for every piece of knowledge :-)
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by zsleo » 15 Mar 2018 21:00

Hi davenovo,

I have been using CGD for a few years now with some great results.

However, the lack of documentation does mean that even now I find myself hacking around blindly to find a solution to "problems" that documentation would quickly allow me to resolve.

Even now I still struggle with re-rendering. When to use, when not to use and what parameter set to implement.

The CGD support team obviously know their product but it is almost impossible to reproduce problems in simple demos - complexity of larger projects counter-interacts with simplicity.....

.... I for one am watching your posts VERY closely to see the outcome of your investigation - both here and on IW.

Please keep posting. Thumbs up from me.

Finally, a suggestion from me. Integrate a tool like MADshi or Eureka to proactively track and fix issues.

All the best...
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by davenovo » 15 Mar 2018 23:16

I do have MadExcept running, and that is great for crashes. But that has not been the problem with the library. Just not familiary with it. Also, among my many questions there are 2 or 3 actual confirmed bugs. But when you are not used to the library, you have no idea if things are not working because of a bug, or you just dont understand how to do something, or otherwise.
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

Next

Return to JQFileUpload

cron

Who is online

Users browsing this forum: No registered users and 2 guests

Contact Us.