Page MenuHomePhabricator

mediawiki-api-error: stashfailed when uploading a file with extension that does not match detected MIME type
Open, LowPublic

Description

I have tried to upload

it failed.

Server response to my request:

Accept-Ranges: bytes
Age: 0
Cache-Control: private, must-revalidate, max-age=0
Content-Length: 165
Content-Type: application/json; charset=utf-8
Date: Mon, 25 May 2015 13:14:55 GMT
Server: nginx/1.6.2
Set-Cookie: WMF-Last-Access=25-May-2015;Path=/;HttpOnly;Expires=Fri, 26 Jun 2015 12:00:00 GMT
Vary: Accept-Encoding
Via: 1.1 varnish, 1.1 varnish, 1.1 varnish
X-Cache: cp1065 miss (0), cp3003 miss (0), cp3010 frontend miss (0)
X-Content-Type-Options: nosniff
X-Firefox-Spdy: 3.1
X-Frame-Options: SAMEORIGIN
X-Varnish: 1193822357, 706748292, 1160432490
mediawiki-api-error: stashfailed
x-analytics: https=1
x-powered-by: HHVM/3.6.1

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

The root cause is:

File extension ".webm" does not match the detected MIME type of the file (video/x-matroska).

This bug seems like another case of T100226

Aklapper renamed this task from mediawiki-api-error: stashfailed when uploading a file to mediawiki-api-error: stashfailed when uploading a file with extension that does not match detected MIME type.Jun 16 2015, 2:28 PM
Aklapper set Security to None.

What's the ticket about? Insufficient/confusing error reporting? Incorrect MIME type detection? Commons has many WebM files so if your file is misdetected as Matroska (for some value of misdetected - technically WebM is a subset of Matroska), it might be a problem with the file.

The initial issue was file is misdetected as Matroska - which was due to a problem with the file.

The real problem is the misleading error. mediawiki-api-error: stashfailed is not helpful.