Three uploaders use same entity ?
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.
I created the following associations:
DocumentProof_LeaveRequestForm — used by File Uploader 1DocumentProof_Proof — used by File Uploader 2So, both uploaders use the same DocumentProof entity, but the relationship through which the file is associated with the LeaveRequestForm is different.
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.
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.
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.