Multiple SupplementaryFiles fields in submission form cause problems
More than one SupplementaryFiles
field in a submission form causes problems. Upon refresh, each uploaded file will appear duplicated in all SupplementaryFiles fields.
This is because the file information is not stored against the individual field, but is simply stored in the files
table with a tag 'supplementary'
to indicate that it belongs to a SupplementaryFiles
field. There is nothing to distinguish which SupplementaryFiles field it belongs to. It appears that the assumption was there would only ever be a single SupplementaryFiles field. The VisualAbstract
field appears to be largely a workaround for this, using a different tag ('visualAbstract'
) to allow a second set of attachments in the same form.
When we converted the decision and review forms into dynamic forms, we developed a more robust implementation whereby the file information for uploaded files is stored within the field data in the form itself. This allows any number of SupplementaryFiles or VisualAbstract fields in a decision or review form without causing problems.
We should use the same approach for the submission form, so that we have a single robust, unified approach for all forms.