Problem/Motivation

In Drupal, all uploads posting via Ajax ($.ajaxSubmit). $.ajaxSubmit is posting FULL FORM DATA all time. Therefore when you uploading files simultaneously, the seconds and later uploads always re-upload previous file data.

In my testing, I trying to upload 2 files (20MB & 30MB). Here's the Content-Length for each posting:

FIRST INPUT:
Content-Length: 31647757

SECOND INPUT:
Content-Length: 53387537

Steps to reproduce:

1. Find a slow server / Or throttling via Proxy or Chrome Console / Or find a timer
2. Setup 2 file uploads
3. Starting to upload a large file to INPUT 1
4. During INPUT 1 is uploading, starting to upload another large file to INPUT 2
5. Check posting data length / upload time

(Noted that: You shouldn't trust Chrome Console throttling all time, in some cases won't work well.)

Proposed resolution

There is code to make an upload button disable file fields for other upload buttons, but it checks to see if the upload button use the Drupal AJAX API, even though the file upload buttons do not use that API. It is fixed by removing this check.

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

droplet created an issue. See original summary.

droplet’s picture

Issue tags: +JavaScript
droplet’s picture

Title: Investigate whether simultanous uploads posting data repeatly » [PERFORMANCE] Simultaneous file uploads re-posting data
Issue summary: View changes
Priority: Normal » Major
Issue tags: +Performance, +FileField, +Field system
FileSize
539 bytes
droplet’s picture

Issue summary: View changes

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Darren Oh’s picture

Title: [PERFORMANCE] Simultaneous file uploads re-posting data » Fix simultaneous file uploads re-posting data
Version: 8.5.x-dev » 8.6.x-dev
Status: Active » Needs review
FileSize
1.61 KB

This bug is caused by the JavaScript only processing buttons that use the Drupal AJAX API even though the file upload buttons do not use this API.

Darren Oh’s picture

Issue summary: View changes