Host a PDF

Hi,

Is it possible to host a PDF on a Discourse instance? Meaning that you could go to discourse.example.com/random-file.pdf and you’d be able to access it from there.

Thanks!

If the instance allows for file uploads with the .pdf extension, it will look like this:

oakland-sorting-guide.pdf (2.1 MB)

Does that answer your question? :slight_smile:


Original link is https://www.oaklandrecycles.com/wp-content/uploads/2022/06/oakland-sorting-guide.pdf, found at Recycling - Oakland Recycles.

4 Likes

Hi there,

I wanted it to be viewable on the domain - not downloadable, so that instead of downloading to the user’s device, they could view it online.

Is that possible?

Thanks!

There’s the Inline PDF Previews theme component that might be of some use, or a plugin variation that allows PDFs to be opened in the browser Discourse send PDF inline.

4 Likes

What you are describing is called “reading the PDF in the web browser”. The links JammyDodger shared will assist you to achieve that effect with Discourse.

However, the PDF files are still downloaded to the user’s device; it is cached in the browser as a downloaded resource being shown to the user.

I understand that some folks like offering the option to read in the browser, I know I’ve made use of this in policy-making instances where we had to read a lot of PDFs obtained from public data dumps.

A separate concern is that large PDFs would take up too much for user devices, due to network or storage limitations; the way to address this issue is by creating smaller PDFs or making that information available as text in a topic. :+1:

5 Likes

@JammyDodger @maiki Many thanks for your help - those are the solutions I wanted to achieve!

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.