Where to Upload a File

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

1 Like

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.

6 Likes

Stephen - I am creating a Resource Category and within that topics and posts. To maintain minimimal storage on my osted server (which isn’t mine it’s digitalocean) would it be best to upload the document in the post OR add the link from where the document is stord (for example in my wordpress site?). I;d welcome your thoughts

You might be interested in:

1 Like

I wasn’t in particular wanting S3 I’m working on the best way to minimise my DigitialOcean space (I have server space for my own WP site, so I can have documents there and will be featuring some on my site also, so would it be best to take the URL from where hosted and add to the Discourse post, or attach directly?

It all depends on your workflow and needs

If a Discourse post which has included an attachment is deleted, that attachment will also eventually be lost. On the other hand attachments to Discourse posts can be protected and restricted from download by users who don’t have access to the original topic/post.

WordPress can manage attachments too, but doesn’t require they be listed in posts. Out-of-the-box it can’t protect files in the same way, if someone can get the path they can usually access the asset.

2 Likes