在哪里上传文件

Hi,

I want users to download files I can store in my server. I created a folder at /var/discourse/, where I uploaded a .doc file so that users can download it just by clicking on the link, example https://www.example.com/forms/theformpath.doc
Where is my server I can put files to be accesible using my discourse site if this is not working in /var/discourse?

Johnny

Attach them to posts. From there you can either link to the posts which contain the files or the attachments themselves. Discourse isn’t document management and doesn’t expose the webroot.

Stephen,我正在创建一个资源分类,并在其中添加主题和帖子。为了在我托管的服务器上(该服务器并非我所有,而是 DigitalOcean)节省存储空间,最好是将文档直接上传到帖子中,还是添加文档存储位置的链接(例如我的 WordPress 站点)?期待您的建议。

您可能感兴趣:

我其实并不特别需要 S3。我正在寻找最佳方式来优化我的 DigitalOcean 存储空间(我已有用于自己 WordPress 网站的服务器空间,因此可以将文档存放在那里,并会在网站上展示部分内容。那么,是应该从托管位置获取 URL 并将其添加到 Discourse 帖子中,还是直接附加文件更合适呢?

这完全取决于您的工作流程和需求

如果删除了包含附件的 Discourse 帖子,该附件最终也会被删除。另一方面,Discourse 帖子的附件可以受到保护,并限制没有访问原始主题/帖子权限的用户下载。

WordPress 也可以管理附件,但并不要求它们必须列在帖子中。默认情况下,它无法以相同的方式保护文件;如果某人获取了路径,通常就能访问该资源。