File Dropper Widget - not able to upload file- getting error Error saving Files! Error!

0
Hello I have created a domain model with Entity A having 1-----* association with entity B(Entity B generalised with system.FileDocument) and set the below values. I used this widget inside Dataview of entity B. When I run the application and try to upload the file, I am getting,  Error saving Files! Error! Not sure what is going wrong. Any suggestions would be greatly appreciated. Thank you in advance.
asked
2 answers
0

Hi Manasa,

If I understand it correctly, you are putting the widget in the wrong spot. You are talking about a 1..* relation between A en B.

  • Let's say A is called Dossier, B is called Document. So a Dossier has a 1..* relation to Document
  • You put the FileDropper in a dataview for Dossier, because you are uploading Document objects for this Dossier
  • You set the File Entity in this screen to Document
  • You set the Association to context to the Dossier (over association from Document). This means that any Document you upload, will automatically get a an association to Dossier (as the 1..* association implies that the Document is the owner of the association)

 

Does this make sense?

answered
0

I got the same error. Looking into the console, the problem seems to be a violation of the PRIMARY KEY constraint. What happens is that all the images are being saved at the same time and all try to create an object with the same id.

A simple solution is by deselecting the autosave option in the FileDropper properties. This will avoid the images are saved simultaneously. However, you do have to manually select each image to save it.

 

To keep the autosave you can do another solution. For this, you need to add a Before Accept microflow (see image below). An empty microflow that returns an empty string is enough for it to work.

 

 

 

 

answered