To reproduce the bug:

  1. Add a File field called "File" to the Article content type
  2. Set the field's "Progress indicator" to "Bar with progress meter"
  3. Grant the "Article: Create new content" permission to the "Anonymous user" role
  4. Enable page caching for anonymous users
  5. Log out from the site
  6. Go to node/add/article
  7. Browse for a large enough file in the File field and click "Upload"

Expected behavior: Moving progress bar reflecting the upload's progress.

Observed behavior: Progress bar stuck at 0% with the "Starting upload..." message displayed until the file is fully uploaded.

Proposed solution: Firebug reveals that requests to the file/progress Ajax callback are being cached when page caching is turned on for anonymous users. This causes the callback to always return the "Starting upload..." message with -1 for the upload progress. The attached patch solves the issue by marking the file/progress Ajax callback uncacheable.

CommentFileSizeAuthor
file_progress_page_cache.patch347 bytesjamix
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jamix’s picture

Any feedback on this?

munkyonline’s picture

Version: 7.x-dev » 7.15

Tested on article comment form with file upload on Drupal 7.15, works without errors.

jasom’s picture

Patch worked for me.

Btw, this is 3 y.o. report.

jasom’s picture

Issue summary: View changes

Here's sandbox module: Upload progress fix and related answer from Stackexchange.

spelcheck’s picture

Can confirm, the sandbox module above works on my 7.56 installations. If you require page caching for anonymous users, this will still allow the progress bar to function as expected.

Version: 7.15 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

KlemenDEV’s picture

This is still bug in D10

poker10’s picture

Version: 7.x-dev » 11.x-dev
Status: Needs review » Needs work

Thanks. So changing the version.