File Uploader widget does not work when used two uploaders side by side

0
Hello Members,I need a help in identifying the solution for the FileUploader widget issue. I am using 2.5.0 version of File Uploader with 10.24.18 version on Studio Pro.Use case is very simple:Create a page with two or three uploaders side by side.Try to upload 20-30 files in each uploader.Few files does not upload due to "Duplicate column value violates its unique constraint: ERROR: duplicate key value violates unique constraint "system$filedocument_pkey".What I already tried:Adding a wait activity in create nanoflow.Tried using microflow.Tried creating new object in error handler.Tried setting max-concurrent upload property to 1.Solutions or any hints would be highly appreciated.
asked
2 answers
0

Three uploaders use same entity ?

answered
0

Hi Kaustubh,

I was able to reproduce a similar scenario and wanted to share how I implemented the File Uploader setup.

In my case, I used a simple LeaveRequestForm entity and a single DocumentProof entity inheriting from System.FileDocument. Instead of creating separate file entities for each uploader, I used two different associations between the same entities to differentiate the files uploaded through each uploader.

Domain model

I created the following associations:

  • DocumentProof_LeaveRequestForm — used by File Uploader 1
  • DocumentProof_Proof — used by File Uploader 2

So, both uploaders use the same DocumentProof entity, but the relationship through which the file is associated with the LeaveRequestForm is different.

File Uploader 1

For the first uploader, I configured the Associated files as:

[DocumentProof, over association 'DocumentProof_LeaveRequestForm']

I also configured a dedicated nanoflow:

ACT_CreateUploadedFileDocument

This nanoflow creates the DocumentProof object and associates it with the LeaveRequestForm through DocumentProof_LeaveRequestForm.

File Uploader 2

For the second uploader, I configured:

[DocumentProof, over association 'DocumentProof_Proof']

And used a separate nanoflow:

ACT_CreateUploadedFileDocument_Proof

This creates another DocumentProof object but associates it through DocumentProof_Proof.

Why I used this approach

The important point here is that I am not creating a separate entity for each uploader. Both uploaders use the same DocumentProof entity. The files are differentiated based on the association through which they are linked to the parent LeaveRequestForm.

This allows me to have multiple uploaders on the same page while maintaining a clear separation between the files uploaded by each uploader.

I have also attached the relevant domain model and file uploader configurations for reference.

With this setup, I was able to upload multiple files through both uploaders successfully.

I hope this will help. One more thing: kindly check whether the child object is getting auto-committed when the file is uploaded.

If the issue persists, kindly share a screenshot of the implementation process.

answered