Page MenuHomePhabricator

Unable to upload a PDF: Internet Explorer would detect it as "text/html"
Open, Needs TriagePublic

Description

I am trying to re-upload https://campuspubs.library.caltech.edu/2243/1/1976.pdf to https://commons.wikimedia.org/wiki/File:The_Big_T_1976.pdf to fix the PDF. But when doing a chunked upload using https://commons.wikimedia.org/wiki/User:Rillke/bigChunkedUpload.js, I get at one point an error:

Cannot upload this file because Internet Explorer would detect it as "text/html", which is a disallowed and potentially dangerous file type.

So how can I upload this PDF?

Event Timeline

I fixed the issue by using a chunk of different size. I think the check should be done only on the first chunk, not on later chunks, because it seems it can have false positives based on how upload is chunked.