Need log the who downloaded attachments

AI 生成的摘要

The discussion revolves around the need to log which users download attachments on a Discourse site. appcomq initially notes the lack of such tracking and expresses concern over large nginx logs with 40,000 users. codinghorror suggests checking nginx logs, but appcomq finds them unwieldy. appcomq shares a screenshot showing only download counters exist, and asks if logging user downloads is technically feasible. They later reference the outdated df-restricted-files plugin, incompatible with Discourse 1.8. dax recommends the Data Explorer plugin to query download data, while tophee cautions that attachments are publicly accessible via direct links. appcomq proposes modifying a script to log user access to .zip/.rar files with usernames. AndyBr questions if a newer restricted files plugin exists. pfaffman points to a secure media uploads topic, which AndyBr finds intimidating and notes they don’t use S3. pfaffman clarifies Data Explorer can track post views but not downloads, and offers paid help to restrict uploads to logged-in users. AndyBr declines due to budget constraints. The core need remains: tracking downloaders and optionally restricting access — both currently unsupported out-of-the-box.

:face_with_thermometer:

My site canot know who downloaded attachments.

Check your nginx logs for that information.

nginx logs too big data.

now have 40,000 users. :face_with_thermometer:

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

I find this GitHub - discourse-pro/df-restricted-files: The «Restricted Files» plugin for Discourse · GitHub

but canot use 1.8

You can install Data explorer plugin 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?)

1 个赞

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

1 个赞

I have a idea, use

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.

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

参见 https://meta.discourse.org/t/secure-media-uploads/meta/140017,也许有帮助?

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

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

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

1 个赞

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

1 个赞