Page MenuHomePhabricator

text like formats (json,csv,etc) misdetected as text/plain by mw
Closed, ResolvedPublic

Description

Author: sreutenauer

Description:
Getting next message when trying to upload a .json file :

L'extension du fichier « .json » ne correspond pas au type MIME détecté du fichier (text/plain).

'filetype-mime-mismatch'


Version: 1.22.6
Severity: normal
Whiteboard: aklapper-moreinfo

Details

Reference
bz66036

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz66036.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Jun 2 2014, 2:58 PM

Hi,
does the file "mime.types" list

text/plain json

?

See https://www.mediawiki.org/wiki/Manual:Mime_type_detection#MIME_type_validation for more information.

sreutenauer wrote:

Hello,

No, it dit not list "text/plain json"
I just added it and now it works fine.

Glad it works for you!
Resetting this ticket to INVALID as no code change was required.

This is technically the wrong solution. We should fix mime type detection for plain text like formats.

Tgr added a comment.Jun 24 2014, 5:35 PM

Also, I don't understand French, but that error sounds horribly uninformative. At a minimum, it should point the user to the manual page.

Change 141765 had a related patch set uploaded by Brian Wolff:
Fix mime detection of easily-confused-with text/plain formats

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

Change 141765 merged by jenkins-bot:
Fix mime detection of easily-confused-with text/plain formats

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

Should be fixed in 1.24

Gilles moved this task from Untriaged to Done on the Multimedia board.Dec 4 2014, 10:21 AM
Gilles raised the priority of this task from Normal to Unbreak Now!.
Gilles lowered the priority of this task from Unbreak Now! to Normal.Dec 4 2014, 11:23 AM