# 带有多个句点的文件扩展名处理不正确

**URL:** <https://meta.discourse.org/t/file-extensions-with-multiple-periods-not-processed-correctly/52674>\
**Category:** Support\
**Created:** [2016年十一月8日 18:30 UTC](https://meta.discourse.org/t/file-extensions-with-multiple-periods-not-processed-correctly/52674 "2016-11-08T18:30:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samnazarko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samnazarko/32/109010_2.png) [@samnazarko](https://meta.discourse.org/u/samnazarko)\
**Post date:** [2016年十一月8日 18:30 UTC](https://meta.discourse.org/t/file-extensions-with-multiple-periods-not-processed-correctly/52674/1 "2016-11-08T18:30:07Z")

</div>

Hello

I want to allow people to upload `.tar.gz` (gzipped tar) on our forum. I have added tgz and .tar.gz as valid file extensions in Settings → Files.

However when I try and upload a `.tar.gz` file, it is rejected, and Discourse says that acceptable formats include ‘targz’:

![](https://global.discourse-cdn.com/meta/original/3X/0/c/0c3c78e471cae904e9063abbbc253d53ddc104e3.png)

Discourse should be able to handle attachments with more than one dot in the file extension.

Cheers

Sam

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2016年十一月8日 18:31 UTC](https://meta.discourse.org/t/file-extensions-with-multiple-periods-not-processed-correctly/52674/2 "2016-11-08T18:31:32Z")

</div>

I think you need to enable the `gz` extension.

---

<div class="post-metadata">

**Author:** ![samnazarko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/samnazarko/32/109010_2.png) [@samnazarko](https://meta.discourse.org/u/samnazarko)\
**Post date:** [2016年十一月11日 13:18 UTC](https://meta.discourse.org/t/file-extensions-with-multiple-periods-not-processed-correctly/52674/3 "2016-11-11T13:18:04Z")

</div>

That worked. Thank you 🙂

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2024年六月8日 12:45 UTC](https://meta.discourse.org/t/file-extensions-with-multiple-periods-not-processed-correctly/52674/4 "2024-06-08T12:45:17Z")

</div>

此主题已在 2768 天后自动关闭。不再允许回复。
