RussCoder / djvujs

DjVu.js is a program library for working with .djvu files online without any connection with the server. DjVu.js Viewer is a widget that allows viewing .djvu files right in the browser and can be easily embedded into any web page.
https://djvu.js.org/
Other
184 stars 37 forks source link

Browsing local files #82

Open jmarucha opened 2 years ago

jmarucha commented 2 years ago

First, much thanks for this super-useful app, it's good complement to pdf.js when browsing a lot of scientific books and papers.

When trying to open local file via Firefox, either with file:// link, drag-and-drop, or opening via Windows Explorer "Open with..." menu, djvu.js doesn't open and download dialogue is shown. This is contrary to how djvu.js handles URLs to DJVU files, and contrary to pdf.js which can be used to open local documents "directly".

RussCoder commented 2 years ago

I'm glad you found the app useful and appreciate your feedback.

As for opening files in Firefox, initially I didn't find a way to implement it. It works in Chrome (if Chrome is opened, you can open files via a double click), but Firefox behaves differently. However, you reminded me about a similar request made several months ago - I was told about an extension that provides such an option to open files with a browser. So I will look at its code and will try to find a solution.

Right now you can open local files only from the initial screen of the extension - drag and drop or just click to select a file.