I would say that this approach is basically incorrect. Instead, the file upload should be done by loading the form in multiple elements, which then should return the file identifier, and then you can attach that identifier to the form so that it retains the link.
source share