PDF preview instead of download, on uploaded files

Based on that topic :arrow_up:︎ is seems that pdf files that we upload to a topic should be one-boxed.

I would like to have the functionality existing in this example, by “techAPJ” but for some reason when I use the file upload button to add a pdf, in the composer, for a topic or a post… i just get the following…

2020-05-19_14-44-39

Then, when a person clicks that link it always downloads. I’d love for it to open in a new window.

Some cloud apps I’ve used in the past will have these URL parameters appended:

&dl=0 (which opens a preview in a new tab) or
&dl=1 (which downloads the pdf)

It sounds like One-boxing is supposed to happen for pdfs, based on the Topics I linked to, above, but maybe I’m doing something wrong :man_facepalming:

1 Like

Oneboxing applies to external PDF links, not direct uploads.

For example, an external link:

versus the same doc, but uploaded:

fw4.pdf (173.5 KB)

6 Likes

Okay, thanks for clarifying that difference.

Do you recommend a place for hosting files, that could then be one-boxed on Discourse?

2 Likes

Just about any file hosting service should work, Dropbox, Google Drive, etc… anywhere that you can upload a publicly accessible file.

5 Likes

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