[Multiple File Upload] How to know if the last file or all the files has been uploaded?

Forge Component
(49)
Published on 26 Jun by Remco Dekkinga
49 votes
Published on 26 Jun by Remco Dekkinga

How to know that the last file (all the files) has been uploaded so I can trigger my webblock?


Thank you.

-Edwin

Solution

ToUpper(Substr(Response, 0, 11)) <> "COMPLETE[0]"

Solution

It worked! Thanks!

Kyle Martinez wrote:

ToUpper(Substr(Response, 0, 11)) <> "COMPLETE[0]"

Dear Kyle Martinez,

I'm new to outsystems. May i know how does this code work in this widget ?

How does it check how many files that the user uploaded?


With Regards,

Wen Kai


Wen Kai wrote:

Kyle Martinez wrote:

ToUpper(Substr(Response, 0, 11)) <> "COMPLETE[0]"

Dear Kyle Martinez,

I'm new to outsystems. May i know how does this code work in this widget ?

How does it check how many files that the user uploaded?


With Regards,

Wen Kai


Hi Wen Kai,

It is actually part of the Response generated in MultipleFileUpload. You can see it in OsNotifyWidget of the web block's initScript (JavaScript).


For the number of files uploaded, you can add a code on your destination action to query the UploadCache using SessionId as filter to know how many files successfully uploaded.


Regards,

-Edwin


Dear Kyle Martinez,


Thanks for the reply. I understand now!


Best Regards,

Wen Kai