Page MenuHomePhabricator

"The filename is not allowed." when attempting to upload MP4 file on
Open, Needs TriagePublic


Steps to reproduce:
Upload video via "Insert" button in Visual Editor

Observed Result:
About a second after encountering the "Details" dialogue, the error pops up and blocks engagement.

Expected Result:
Video uploads and the page allows for interaction with the dialogue.

Screenshot/Screen capture:

Screen Shot 2021-01-04 at 6.28.29 PM.png (659×519 px, 54 KB)

MacBook Air 13-inch Early 2015

Chrome Version 87.0.4280.88 (Official Build) (x86_64)





Event Timeline

After getting this message on Commons

Screen Shot 2021-01-04 at 6.26.46 PM.png (440×380 px, 48 KB)

I assume the error is because VE does not support .mp4 files. However, the error seems to suggest that the name of the file is the issue (which is sort of true, though editing out ".mp4" from the filename does not change the issue). So, this might not be a bug, but rather a feature request for a clearer error message. :)

Jdforrester-WMF subscribed.

The cross-wiki upload tool is not VE-specific, it's also in the 2010 and 2017 wikitext editors. Unfortunately there's no Multimedia team any more…

Re-wording the error message from "extension" to "file type" is easy, but not necessarily much more helpful…

The API error is illegal-filename so the editor is behaving correctly. This is a bug in ApiUpload::verifyUpload() - in the chunked upload code path, it is checking UploadBase::getTitle() and then returning a useless error message, instead of checking UploadBase::validateName() which would provide a useful error.

Ha. I guess it should call them the other way around?

… or given that checkVerification handles case UploadBase::ILLEGAL_FILENAME and case UploadBase::FILETYPE_MISSING, just scrap it? But then, there's also case UploadBase::FILE_TOO_LARGE

Yeah, just scrap, I think. FILE_TOO_LARGE and the other UploadBase::verifyUpload() stuff will be checked later - AIUI the first two branches in ApiUpload::verifyUpload() are called for individual chunks so most checks wouldn't make sense there. After the file is assembled, it will be called again and will use the last branch.

Change 654479 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] ApiUpload: Don't error about filenames on partially-uploaded files

@Jdforrester-WMF: Per emails from Sep18 and Oct20 and , I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome. Thanks for your understanding!

@Lectrician1: Please do not add "me too" comments which add nothing but notifications. Use tokens instead. Thanks.