# Need log the who downloaded attachments

**URL:** https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454
**Category:** Feature
**Created:** [2017年七月2日 05:58 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454 "2017-07-02T05:58:05Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![appcomq](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/appcomq/32/84767_2.png) [@appcomq](https://meta.discourse.org/u/appcomq)
#### Post date: [2017年七月2日 05:58 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/1 "2017-07-02T05:58:05Z")

</div>

🤒

My site canot know who downloaded attachments.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2017年七月2日 06:01 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/2 "2017-07-02T06:01:25Z")

</div>

Check your nginx logs for that information.

---

<div class="post-metadata">

### Author: ![appcomq](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/appcomq/32/84767_2.png) [@appcomq](https://meta.discourse.org/u/appcomq)
#### Post date: [2017年七月2日 06:39 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/3 "2017-07-02T06:39:56Z")

</div>

> [@codinghorror](#):
>
> Check your nginx logs for that information.

nginx logs too big data.

now have 40,000 users. 🤒

---

<div class="post-metadata">

### Author: ![appcomq](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/appcomq/32/84767_2.png) [@appcomq](https://meta.discourse.org/u/appcomq)
#### Post date: [2017年七月2日 06:45 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/4 "2017-07-02T06:45:15Z")

</div>

![](https://global.discourse-cdn.com/meta/original/3X/7/a/7a3b49cbea9b48033d7dedcb24bec549a3a61f6f.png)

Now only have counter, I wanto logs who user download. can it be technically possible?

---

<div class="post-metadata">

### Author: ![appcomq](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/appcomq/32/84767_2.png) [@appcomq](https://meta.discourse.org/u/appcomq)
#### Post date: [2017年七月2日 07:06 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/5 "2017-07-02T07:06:03Z")

</div>

I find this [GitHub - discourse-pro/df-restricted-files: The «Restricted Files» plugin for Discourse · GitHub](https://github.com/discourse-pro/df-restricted-files)

**but canot use 1.8**

 ![](https://global.discourse-cdn.com/meta/original/3X/8/d/8db3ef17cf18ae857436034672d177c654e219fc.png)

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [2017年七月2日 22:22 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/6 "2017-07-02T22:22:38Z")

</div>

You can install [Data explorer plugin](https://meta.discourse.org/t/data-explorer-plugin/32566) and write an SQL query for that (or ask here if someone can write a query for you [(Superseded) What cool data explorer queries have you come up with?](https://meta.discourse.org/t/what-cool-data-explorer-queries-have-you-come-up-with/43516))

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [2017年七月3日 05:28 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/7 "2017-07-03T05:28:59Z")

</div>

Note that attachments can be downloaded by anyone who has the link.

> [@File attachments in restricted categories should be restricted](https://meta.discourse.org/t/file-attachments-in-restricted-categories-should-be-restricted/60765):
>
> Currently, files that are uploaded to a restricted category are accessible to anyone, even users who are not logged in. Chances are that these files get indexed by search engines and thus become public. I agree with @tobiaseigen that this is quite a serious issue: But I am not sure what exactly the current state of affairs is regarding this, except that, some time ago, @dmitry_fedyuk created the [restrict files plugin](https://meta.discourse.org/t/restrict-files-plugin-sell-a-digital-content-on-your-discourse-forum-version-1-2-1-2015-07-19/29775) whose [latest version seems to be 2.1](https://discourse.pro/t/topic/33) which is [confirmed to be compatible with…](https://discourse.pro/t/topic/33/6)

---

<div class="post-metadata">

### Author: ![appcomq](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/appcomq/32/84767_2.png) [@appcomq](https://meta.discourse.org/u/appcomq)
#### Post date: [2017年七月3日 17:51 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/8 "2017-07-03T17:51:55Z")

</div>

I have a idea, use

[script/nginx\_analyze.rb](https://github.com/discourse/discourse/blob/a300e01af364202d9e86b77f1ede0bf17214c3b7/plugins/discourse-nginx-performance-report/script/nginx_analyze.rb)

can help me add the code ? Output all zip and rar url User access Filename + username.

So I know who downloaded it.

---

<div class="post-metadata">

### Author: ![AndyBr](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@AndyBr](https://meta.discourse.org/u/AndyBr)
#### Post date: [2021年五月6日 19:08 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/9 "2021-05-06T19:08:12Z")

</div>

有新的受限制文件插件吗？您提供的链接似乎指向一个较旧的版本，可能不兼容最新版的 Discourse？

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2021年五月6日 20:27 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/10 "2021-05-06T20:27:42Z")

</div>

参见 [https://meta.discourse.org/t/secure-media-uploads/meta/140017，也许有帮助？](https://meta.discourse.org/t/secure-media-uploads/meta/140017%EF%BC%8C%E4%B9%9F%E8%AE%B8%E6%9C%89%E5%B8%AE%E5%8A%A9%EF%BC%9F)

---

<div class="post-metadata">

### Author: ![AndyBr](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@AndyBr](https://meta.discourse.org/u/AndyBr)
#### Post date: [2021年五月6日 21:08 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/11 "2021-05-06T21:08:03Z")

</div>

哇！看起来好吓人。  
另外，你们不用 S3（我猜是指亚马逊的 S3）？  
不过还是谢谢。  
我只是想获取一个下载过文件的人员列表，如果能保护这些文件，仅限授权用户访问，那就更好了！

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2021年五月7日 02:24 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/12 "2021-05-07T02:24:18Z")

</div>

我想你可以用数据探索器获取查看过这些帖子的人员列表。但我不确定能否知道谁下载了它们。

如果你有预算，我或许可以帮忙限制上传内容的访问权限，仅允许已登录用户访问。

---

<div class="post-metadata">

### Author: ![AndyBr](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@AndyBr](https://meta.discourse.org/u/AndyBr)
#### Post date: [2021年五月7日 13:41 UTC](https://meta.discourse.org/t/need-log-the-who-downloaded-attachments/65454/13 "2021-05-07T13:41:27Z")

</div>

谢谢。  
很遗憾，目前我没有预算进行任何定制。
