# 主题上传中无法上传多种字体类型

**URL:** https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810
**Category:** Bug
**Created:** [2018年三月25日 17:27 UTC](https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810 "2018-03-25T17:27:34Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [2018年三月25日 17:27 UTC](https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810/1 "2018-03-25T17:27:34Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2018年三月25日 23:55 UTC](https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810/2 "2018-03-25T23:55:25Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [2018年三月26日 03:30 UTC](https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810/3 "2018-03-26T03:30:30Z")

</div>

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

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2018年三月27日 14:01 UTC](https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810/4 "2018-03-27T14:01:24Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [2018年三月27日 22:56 UTC](https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810/5 "2018-03-27T22:56:46Z")

</div>

@Regis\_Hanol no they are different

CC8644C31B26BC4D9D57A7DC6CE2660549ABE1BD  
7F8CAFCC0671CEDB7900B66834B09D0CDE7A7274

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2018年三月27日 22:58 UTC](https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810/6 "2018-03-27T22:58:38Z")

</div>

Oh, then it’s a probably a bug. Could you send me both file at [regis.hanol@discourse.org](mailto:regis.hanol@discourse.org)?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2018年三月28日 16:58 UTC](https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810/7 "2018-03-28T16:58:28Z")

</div>

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](https://github.com/discourse/discourse/commit/fa608f2bb4e25d265f9624e5150550d7dae9089d)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2018年三月29日 16:00 UTC](https://meta.discourse.org/t/cannot-upload-multiple-font-types-in-theme-uploads/83810/8 "2018-03-29T16:00:07Z")

</div>

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