Closed geann closed 1 day ago
Thanks for reporting this along with the super-clear replication steps @geann. I've been able to replicate and resolve the problem and we'll include it in the upcoming releases.
Amazing, thanks for resolving this so quickly @AndyButland 🙌
I have recently had a problem with Umbraco Forms submissions sent to a website via Headless Forms API. The client reported that they were intermittently receiving form entries without any attachments.
Reproduction
Bug summary
Having investigated this problem, I found that it was happening for specific file types that were not in the allowed types list. Website users did not get any errors and all form fields were saved to the entry correctly apart from the file upload field. There were no error messages in Umbraco log files, just a message that the form entry with this ID was submitted.
As a workaround, we temporarily added the file type that was causing problems to the list of allowed files types (JPEG in our case).
Specifics
/umbraco/forms/api/v1/entries/{id}
Steps to reproduce
Umbraco:Forms:Options:EnableFormsApi
configuration key totrue
as described in documentation.message
.supportingDocuments
. Select PDF, PNG and JPG as allowed file types.with JSON body:
Expected result
It would be good for the API to return the status code
422 Unprocessable Entity
and a validation error message similar to the error we get when a form is rendered in an MVC view:Actual result
The form is submitted successfully, API returns the
202 Accepted
status code and the thank you message configured for the form:At the same time, the created form entry does not contain the attached file: