File upload in progress alert always displays

Created on 10 June 2019, over 5 years ago
Updated 8 November 2023, 12 months ago

When uploading files to a webform, the "File upload inprogress. Uploaded file may be lost." alert always displays, it seems the webform-auto-file-uploads property is never set to 0.

Issue must be in webform.element.managed_file.js but I haven't narrowed it down yet.

To replicate:

Use the webform below.
Upload 5 files.
Wait a few seconds and press submit. The dialog should show even though all files have been uploaded correctly.

page_1:
  '#type': wizard_page
  '#title': 'Page 1'
  file:
    '#type': managed_file
    '#title': file
    '#multiple': 10
    '#uri_scheme': public
🐛 Bug report
Status

Closed: works as designed

Version

5.0

Component

Code

Created by

🇳🇿New Zealand danielveza Brisbane, AU

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇸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

Production build 0.71.5 2024