Cannot upload multiple font types in theme uploads

I’m trying to upload different font types (woff, woff2, ttf) for support in different browsers, but when I upload say opensans-regular-webfont.woff2, then upload opensans-regular-webfont.woff it replaces the woff2 version with the woff version. Is there anyway around this?

Sounds like a bug to me, but are there actually cases where you need wofff anyway? I think you can get away with just woff2 and eot for IE.

That said a very simple workaround would be renaming the file.

opensans-regular-webfont.woff2 , opensans-regular-webfont1.woff should work fine.

1 Like

Thanks Sam, I’ll try renaming. It does seem to be a bug although not critical by any means

Actually, I don’t think it’s a bug and renaming won’t help. I think both files have the same SHA1 and thus are considered the same…

@davidkingham what’s the SHA1 of both files?

2 Likes

@Regis_Hanol no they are different

CC8644C31B26BC4D9D57A7DC6CE2660549ABE1BD
7F8CAFCC0671CEDB7900B66834B09D0CDE7A7274

3 Likes

Oh, then it’s a probably a bug. Could you send me both file at regis.hanol@discourse.org?

5 Likes

Turns out, we were overriding the theme upload since the variable name was the same (ie. based on the filename).

https://github.com/discourse/discourse/commit/fa608f2bb4e25d265f9624e5150550d7dae9089d

8 Likes

This topic was automatically closed after 23 hours. New replies are no longer allowed.