This repository has been archived by the owner on Apr 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Include PDF.js rather than hotlinking from mozilla.github.io #192
Comments
I tried this at the very beginning, and ran into some issue where I realized it was easier to just hotlink. This was the original post for the shortcode, btw http://fusion.net/story/31465/here-are-the-best-parts-of-the-leaked-budget-for-the-interview-north-koreas-least-favorite-movie/ |
Potentially building in a CORS proxy might work as well, although could have copyright repercussions since you're essentially rehosting the content, plus performance would suckkkkk. |
Closed
#197 makes it possible to embed locally-hosted pdfs. To do in followup:
|
This was referenced Dec 23, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now, the PDF shortcode outputs an iframe which loads https://mozilla.github.io/pdf.js/web/viewer.html
Since this is on a different origin, it requires local PDFs (in uploads, e.g.) to have cross-origin headers. If this was bundled with Shortcake Bakery instead, CORS headers would not be required for local PDFs.
(As a sidenote, maybe having UI to select a local PDF rather than just a URL would be cool too.)
The text was updated successfully, but these errors were encountered: