Page MenuHomePhabricator

When attempting to import a file for a file type not included in $wgFileExtensions the error is unclear
Closed, DuplicatePublic2 Story Points

Description

When trying to import a file with the .webm extension when the webm extension is not in wgFileExtensions the user is redirected to the below page.

This error can be improved and should probably state that the file extension is not allowed rather than prompting the user to change the title.

TODO Add error message which could give a listing of the allowed endings as well.

Event Timeline

Addshore created this task.Jan 26 2018, 4:50 AM
Restricted Application added a project: TCB-Team. · View Herald TranscriptJan 26 2018, 4:50 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tobi_WMDE_SW set the point value for this task to 2.Feb 13 2018, 3:50 PM
Lea_WMDE triaged this task as Normal priority.Feb 15 2018, 5:11 PM
Lea_WMDE added a project: WMDE-Design.
Lea_WMDE updated the task description. (Show Details)
Restricted Application added a project: Design. · View Herald TranscriptFeb 15 2018, 5:11 PM
Lea_WMDE updated the task description. (Show Details)Feb 15 2018, 5:19 PM

UX Team currently does not know how to improve this, since we don't know which:

  • errors can happen
  • which information is passed to the frontend that can be used to make errors more specific.

I'm not sure how much design work needs to be put in here.

  1. The error message should actually state what the problem is, for example "You can not import files with the given file extension as it is not in the allowed list of (.gif, .jpg, .png)"
  2. The error page should not display a form prompting you to change the name of the file, as no file name will be valid, the extension is the issue.

which errors can happen

File extension not allowed / not in the whitelist

which information is passed to the frontend that can be used to make errors more specific.

Right now no information is passed through and the error is infact terrible.
It would be trivial to pass a list of allowed file extensions into the error message to be displayed.

The error page should not display a form prompting you to change the name of the file, as no file name will be valid, the extension is the issue.

Good, that makes it easier :-)

Indeed. So, without a lot of pondering I say that we should give the implication (can't be imported), give the reason (.nnn is an sometype file, is a not accepted type on this wiki) and an alternative (upload in another filetype), for which we would need the extension and/or mime to be passed.

File extension not allowed / not in the whitelist

Do we check mime or just the last n letters after the last .? Asking, because I would like to prevent to suggest that changing the name of the original file from .bizarreformat to .jpg will help.

Do we check mime or just the last n letters after the last .? Asking, because I would like to prevent to suggest that changing the name of the original file from .bizarreformat to .jpg will help.

mime is also checked somewhere

Addshore removed a subscriber: Addshore.Apr 3 2018, 9:02 AM