inveniosoftware / invenio-previewer

Invenio module for previewing files.
https://invenio-previewer.readthedocs.io
MIT License
5 stars 60 forks source link

webpack: missing bundles #109

Open zzacharo opened 4 years ago

zzacharo commented 4 years ago

In this file there is a dependency on /static/js/pdfjs/pdf.worker.min.js but the file is not bundled. We should either include it in the static file or create a specific bundle for that. Or align assets/js/pdfjs/viewer.js with static/js/pdfjs/viewer.js.

egabancho commented 4 years ago

Is this somehow connected with this error message?

The resource from “https://127.0.0.1:5000/static/js/pdfjs/pdf.worker.min.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff). loremipsum.pdf

I'm using Invenio-Previewer 1.1.0 and Firefox 73.0.1

zzacharo commented 4 years ago

@egabancho what I noticed is that the file is required but not placed correctly under /static. Your issue seems more like a CSP one. In my case the pdf preview is working properly but still I think the fact that the file is not there needs to be addressed by removing it if is not necessary or fixing it :)

ppanero commented 3 years ago

Tl;DR: