5
Views
5
Comments
[ReactFilePondUpload] Multiple component instances on the same page
Forge component by Stuart Harris
9
Published on 21 Nov 2020
Application Type
Reactive

Hi Stuart,


I have a page where I am using 2 instances of this component to upload files.

It seems that the UploadStarted function and the DOM Id that is passed on are the ones from the second (last) component from the DOM. To test this if you place 2 components on the same page and upload from the first one, you will see that the upload animation does not close since the Id passed to JS is that of the second component.

Also, the disable upload parameters(AllowBrowse and AllowDrop) only record the initial value that the component is instantiated with. They do not change dynamically.

My problem is that I am trying to disable one component when the other one started the upload process.

Thank you

Champion
Rank: #154

Hi Radu,

I appreciate your clear description of the problem and explanation of what you are trying to achieve.

I admit I have not added a page to the demo app to test use of multiple components at the one time.  So it is no surprise there is a defect there.

I am looking at it now and should have a fix in the next week.  Please let me know if there are any deadlines impacting you that could be helped by having a fix sooner.

I should be able to identify the issue without this, but it would help if you could let me know whether you are using the UploadBlock or the AutoUploadBlock.  Also posting the full configuration you are using would also ensure I don't miss anything.  But again, if my testing is good enough, I should find it regardless.

Thanks Radu!

Kind regards,

Stuart

Champion
Rank: #154

Hi Radu,

Quick update, I have reproduced the problem with the UploadBlock, though I assume it also affects the AutoUploadBlock.  The issue also affects the FilePondUpload_Reset and FilePondUpload_GetTokens actions.

I plan to add an option parameter which will be the HTML id of the upload block for use when there are multiple components on the page (but not required when there is only one).

Here is the test page on the demo app React FilePond Multiple Upload (shkiandra.outsystemscloud.com)

Champion
Rank: #154

Hi Radu,

I have posted a new version of the plugin as under development.  It appears to work correctly now with multiple widgets on the same page.

Would you like to try it out and let me know if it is working for you?  If it works ok for you I will move it to stable.

Kind regards,

Stuart