Page MenuHomeMiraheze

Enable file types uploads
Closed, ResolvedPublic

Description

**https://dc.miraheze.org**https://dc.miraheze.org

Can I please have the

  • .ttf,
  • .woff,
  • .otf,
  • .woff2

file types be allowed?

Event Timeline

RhinosF1 closed this task as Resolved.Jul 2 2020, 09:33
RhinosF1 claimed this task.
RhinosF1 updated the task description. (Show Details)
RhinosF1 edited projects, added Configuration; removed MediaWiki.
RhinosF1 updated the task description. (Show Details)

@RhinosF1 whenever I try to upload any font (type .ttf) - I get "File extension ".ttf" does not match the detected MIME type of the file (application/font-sfnt)." no matter what, even if directly downloaded as ttf and with any font. Can you try and fix that?

RhinosF1 added a comment.Jul 2 2020, 14:00
In T5856#114310, @Carp_Universum wrote:

@RhinosF1 whenever I try to upload any font (type .ttf) - I get "File extension ".ttf" does not match the detected MIME type of the file (application/font-sfnt)." no matter what, even if directly downloaded as ttf and with any font. Can you try and fix that?

Can you upload the file to here so I can perform checks on it?

RhinosF1 added a comment.Jul 2 2020, 14:18
In T5856#114314, @Carp_Universum wrote:

@RhinosF1 added above

I've checked the files and from what I can see it's been detected as an older MIME type that mediawiki hasn't mapped. I'll raise it upstream but I'm not sure whether this is intentional or an oversight.

In T5856#114314, @Carp_Universum wrote:

@RhinosF1 added above

I've checked the files and from what I can see it's been detected as an older MIME type that mediawiki hasn't mapped. I'll raise it upstream but I'm not sure whether this is intentional or an oversight.

So all ttf files won't work to upload then?

RhinosF1 added a comment.Jul 2 2020, 14:22
In T5856#114316, @Carp_Universum wrote:
In T5856#114314, @Carp_Universum wrote:

@RhinosF1 added above

I've checked the files and from what I can see it's been detected as an older MIME type that mediawiki hasn't mapped. I'll raise it upstream but I'm not sure whether this is intentional or an oversight.

So all ttf files won't work to upload then?

No, ones with the MIME type detected as "application/x-font-ttf" like ttf files should have will work.

Thank you! I will wait and see if you can fix that, I can not seem to find font versions that work for it.

Universal_Omega reopened this task as Open.Jul 8 2020, 16:07

@RhinosF1 are you still able to fix this?
I need them allowed, because I am unable to get the right Mime type I guess. (no ttf files seem to work) I used a mime checker and it says mime type is font/ttf also, and even newly downloaded fonts are saying they are sfnt.

RhinosF1 closed this task as Declined.Jul 8 2020, 16:10

Strictly upstream. Awaiting clarifications from them.

Strictly upstream. Awaiting clarifications from them.

Well even if not adding sfnt, then why does my mime checker say it is font/ttf not application/font-sfnt, it is ttf not sfnt mime type I thought.

RhinosF1 added a comment.Jul 8 2020, 16:20
In T5856#115008, @Carp_Universum wrote:

Strictly upstream. Awaiting clarifications from them.

Well even if not adding sfnt, then why does my mime checker say it is font/ttf not application/font-sfnt, it is ttf not sfnt mime type I thought.

Again, Still strictly upstream. Awaiting more guidance.

In T5856#115008, @Carp_Universum wrote:

Strictly upstream. Awaiting clarifications from them.

Well even if not adding sfnt, then why does my mime checker say it is font/ttf not application/font-sfnt, it is ttf not sfnt mime type I thought.

Again, Still strictly upstream. Awaiting more guidance.

Alright, then I will wait.

This comment was removed by Universal_Omega.
Universal_Omega added a comment.EditedJul 8 2020, 16:42

Also, uploading OTF files gives me this:

File extension ".otf" does not match the detected MIME type of the file (application/vnd.ms-opentype).

@RhinosF1 is it possible to set:

$wgVerifyMimeType = false;

for 10 minutes, let me upload them, then turn it back off?

RhinosF1 added a comment.Jul 8 2020, 17:00
In T5856#115013, @Carp_Universum wrote:

Also, uploading OTF files gives me this:

File extension ".otf" does not match the detected MIME type of the file (application/vnd.ms-opentype).

@RhinosF1 is it possible to set:

$wgVerifyMimeType = false;

for 10 minutes, let me upload them, then turn it back off?

If you stick the uploads in a zip, I can get someone to try server side.

Sure! Thanks!
Here is the zip @RhinosF1

Patch pushed upstream for review

RhinosF1 reopened this task as Open.EditedAug 21 2020, 08:34

Now available on upstream REL1_34 branch

Now available on upstream REL1_34 branch

Thanks!

RhinosF1 closed this task as Resolved.Fri, Sep 25, 15:04
RhinosF1 reassigned this task from RhinosF1 to Paladox.
RhinosF1 added a subscriber: Paladox.

Deployed in latest MediaWiki update by @Paladox