# 为特定用户隐藏已上传的文件

**URL:** https://meta.discourse.org/t/hiding-uploaded-files-for-specific-users/79830
**Category:** Support
**Created:** [2018年二月5日 15:18 UTC](https://meta.discourse.org/t/hiding-uploaded-files-for-specific-users/79830 "2018-02-05T15:18:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jordan1909](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jordan1909](https://meta.discourse.org/u/jordan1909)
#### Post date: [2018年二月5日 15:18 UTC](https://meta.discourse.org/t/hiding-uploaded-files-for-specific-users/79830/1 "2018-02-05T15:18:35Z")

</div>

Using a similar path as found [here](https://meta.discourse.org/t/plugin-tutorial-1-how-to-manipulate-the-text-in-the-composer/10925), it is possible to hide a file with a specific file extension for users that are not staff?

In our install we frequently have customers upload backups which could include private information that we would like to auto-hide for non admin users. I was thinking something like this would work but I would have to capture the .tar extension?

I would love a second opinion.

---

<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年二月5日 15:27 UTC](https://meta.discourse.org/t/hiding-uploaded-files-for-specific-users/79830/2 "2018-02-05T15:27:58Z")

</div>

Why don’t you ask your customers to uploads the backups in a PM to staff? Then, only them and the staff will be able to see the files.

---

<div class="post-metadata">

### Author: ![jordan1909](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jordan1909](https://meta.discourse.org/u/jordan1909)
#### Post date: [2018年二月5日 16:12 UTC](https://meta.discourse.org/t/hiding-uploaded-files-for-specific-users/79830/3 "2018-02-05T16:12:08Z")

</div>

@zogstrip

This is actually how we are doing it now which does work however many customers frequently forget which then requires us to manually move them over or hide them in a staff whisper. In a perfect world this would work however we frequently have staff forget to do this which leads to a liability risk on our end.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [2018年二月5日 19:51 UTC](https://meta.discourse.org/t/hiding-uploaded-files-for-specific-users/79830/4 "2018-02-05T19:51:30Z")

</div>

At the risk of featureitis, would it be a useful thing to have another site setting `allowed extensions in PMs`? We could make it impossible for them to upload these files to public topics.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2020年五月8日 00:11 UTC](https://meta.discourse.org/t/hiding-uploaded-files-for-specific-users/79830/5 "2020-05-08T00:11:41Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2024年七月9日 15:20 UTC](https://meta.discourse.org/t/hiding-uploaded-files-for-specific-users/79830/6 "2024-07-09T15:20:05Z")

</div>



---

<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年七月10日 06:58 UTC](https://meta.discourse.org/t/hiding-uploaded-files-for-specific-users/79830/7 "2024-07-10T06:58:11Z")

</div>


