- 🇪🇸Spain qpro Spain
I had this issue too but finally find the problem:
TLTR:
Solved adding "client_max_body_size 10M;" in "/etc/nginx/nginx.conf" to increase size limit.
https://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/
Long versión:
The issue was that when accessing the webform from a mobile device, I could upload a photo from the gallery, but I couldn't upload a photo directly taken with the camera (message "File upload inprogress. Uploaded file may be lost.")
Checking the size of a very similar photo in the Android gallery (photos taken directly with the camera don't get saved in the gallery when there's an error), it occupied 1.5 MB, which is below the 2 MB limit of the website.
Using Chrome's development tools with USB debugging on the mobile device enabled, I encountered the error "413 Payload Too Large." , and in the NGINX logs, there was "client intended to send too large body: 2984188 bytes," which was indeed above the PHP limit.
It seems that the image is optimized when saved on the mobile device but not when sent directly. So, I increased the limit to 10 MB, but the error still persisted.
This article provided me with the hint to make changes in NGINX and also include a larger margin for BASE64 encoding.
https://drupal.stackexchange.com/questions/80809/413-file-entity-too-large-ugly-error