Page MenuHomePhabricator

UploadWizard fails to upload file without extension (TypeError: this.title is null)
Closed, DuplicatePublic

Description

When i try to upload

I get the error in the title.

Event Timeline

Matanya raised the priority of this task from to Needs Triage.
Matanya updated the task description. (Show Details)
Matanya added a project: UploadWizard.
Matanya subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This seems to be caused by the fact the file name is missing a file extension. Please find a nicer why to error on that or use a method to determine file types.

Aklapper renamed this task from Upload Wizard fails to upload file with: Error: https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=ext.uploadWizard&skin=vector&version=20150522T032854Z&* at line 78: TypeError: this.title is null to Upload Wizard fails to upload file with extension with: Error: https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=ext.uploadWizard&skin=vector&version=20150522T032854Z&* at line 78: TypeError: this.title is null.May 30 2015, 3:00 PM
Aklapper set Security to None.

Change 235363 had a related patch set uploaded (by Bartosz Dziewoński):
Correctly report an error for file names without extension

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

matmarex renamed this task from Upload Wizard fails to upload file with extension with: Error: https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=ext.uploadWizard&skin=vector&version=20150522T032854Z&* at line 78: TypeError: this.title is null to UploadWizard fails to upload file without extension (TypeError: this.title is null).Sep 1 2015, 9:31 PM
matmarex claimed this task.
matmarex subscribed.

UploadWizard will reject files that have filenames without extension. It might be possible to accept them (we could try detecting the MIME type, or asking the user what type this is), but that would be very difficult with current codebase, and I think that not accepting them is intentional. Error handling for this case was broken, though.