Page MenuHomePhabricator

UploadStash - Cannot serve a file larger than 1048576 bytes.
Open, LowPublic

Description

When trying to open a large file on stash to resume upload, it failed loudly with an 50x internal error.

How to reproduce the issue:

  1. Through UploadWizard, upload a large file with chunked uplads
  2. Don't complete the upload process
  3. Go to stash
  4. Click on the file

Expected result:
to get the possibility to write metadata and complete upload process

Actual result:
The link go to the file media, https://commons.wikimedia.org/wiki/Special:UploadStash/file/134ceu2a9j3s.8n9c5h.2406129.ogx

Internal Server Error
Cannot serve a file larger than 1048576 bytes.


Initially reported by Deasyzor.

Event Timeline

Dereckson raised the priority of this task from to Needs Triage.
Dereckson updated the task description. (Show Details)
Dereckson updated the task description. (Show Details)
Dereckson set Security to None.

This task should be either better phrased or declined:

  • the part about completing the upload process is already discussed on T85561 for UploadWizard (Special:UploadStash is MediaWiki core, but the main user is probably UploadWizard) and there is already a patch about resuming stashed uploads in UploadWizard;
  • the part about the Internal Server Error can be reproduced with any file larger than 1Mio, but it is a feature to avoid abuse with people using Special:UploasStash as a file drop, see comment in code.

Possibly the second part could be slightly improved by either removing the link in Special:UploadStash for files larger than 1 Mio either displaying a more friendly error message, and it is not really a 500 Internal Server Error but rather a 403 Forbidden (it is not a server error, but a refusal according to a policy).

I'm facing the same 500 internal error on a MediaWiki instance I'm working on. I understand the reason of this 1Mio limit, but this should be at least configurable in the LocalSettings to allow non-Wikimedia wikis to adjust it depending of their need.

Change 906772 had a related patch set uploaded (by 0x010C; author: 0x010C):

[mediawiki/core@master] Add UploadStashMaxServeBytes configuration setting

https://gerrit.wikimedia.org/r/906772