Skip to content

Attaching PDF files in preview mode #396

Answered by soumendrak
soumendrak asked this question in Q&A
Discussion options

You must be logged in to vote

I had to do both to make it work.

  1. My CSP at config.toml for frame-src directive now looks like this:
{ 
  directive = "frame-src", 
  domains = ["player.vimeo.com", 
             "https://www.youtube-nocookie.com", 
             "http://127.0.0.1:1111/", 
             "https://www.soumendrak.com"] 
},
  1. My HTML tag looks like this:
<object data="/pdfs/cv.pdf" type="application/pdf" width="100%" height="1800px">
      <p>Unable to display PDF file? <a href="/pdfs/cv.pdf">Download</a> instead.</p>
</object>

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@welpo
Comment options

@soumendrak
Comment options

Answer selected by soumendrak
@welpo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants