What I’m trying to do
I’m trying to share PDFs on my Obsidian Publish website, but this only works on desktop. On mobile devices, PDFs cannot be opened due to Publish’s use of the Chrome PDF viewer. They also cannot be downloaded for the same reason.
Things I have tried
Attempts to download PDFs directly using the “download link” function also fail, as it only downloads the webpage itself and not the document.
I currently have a workaround in-place, but it’s suboptimal because I have to inspect the PDF viewer element and extract the the original URL (e.g. https://publish-01.obsidian.md/access/c70f8f52c3adece09113e3690dfbf6c7/local/file/path/doc.pdf), then insert it into the page as an external link. This is very time consuming, as I already have a lot of PDFs on my site and regularly add more. On a more trivial note, the link is kind of ugly.
Is there a better way to provide my users a link for directly downloading PDFs?
Thanks in advance for any guidance!