Files/Download Manager For Discourse

I think that your best bet for that is to host the files somewhere with access control, ACLs and stuff. Google Docs/Drive is a good example of that.

3 个赞

Hmm. Or possibly OwnCloud. At least an idea to explore!

3 个赞

any new idea for media/file manager ??

My «Restrict Files» plugin solves the problem of access control to forum digital content (downloads).
The forum owner can grant the download permissions only to a particular forum groups / or to users with specified trust level and withdraw download permissions from other groups / users.
An example of restricted file: http://discourse.pro/file/113
You can not download it neither anonymously nor by just registering on the forum.
You must be a member of permitted user group to download the file.
You can test it yourself:
A test account without download permissions: login: test_bob, password: 123456
A test account with download permissions: login: test_john, password: 654321
A file is always permitted to be downloaded by its uploader.

我很喜欢这里提供的这个示例。

我有个关于上传图片的问题。

我经常上传图片后改变主意……删除图片,然后可能再上传另一张。

我猜那些未使用的已上传文件(比如这种情况)仍然会存储在我的实例的某个地方。

是否有某种自动删除功能,可以移除那些实际上未在任意位置显示或附加到任何主题的文件?我猜应该没有。

如果能像 @tobiaseigen 给出的示例那样,看到实例中正在使用的文件列表,并且还能看到每个资源具体在哪里被使用/显示……或者显示它“未被使用”,那将非常有帮助。

也许这种使用场景非常罕见,以至于开发此类功能并不值得。2MB 对存储空间来说影响不大……但如果这种情况频繁发生,在一个大型论坛中,随着时间推移……也许就会成为一个需要关注的问题 ¯\_(ツ)_/¯

更新:此功能已实现。

4 个赞

是的,如果文件未出现在任何未删除的帖子中,它将在(7?)天后被“标记为已删除”,并在再过(14?)天后被彻底删除。

5 个赞