-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download attached files in the Browser's context #481
Comments
That's a good idea, and would be possible to implement using https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/downloads/download. We should also add an option that enables this in-the-browser download behavior, as some people may not want to download files at all. PR is very welcome. |
I've been thinking a bit on how this could be solved. Several points come to mind:
|
This would be my preference. Either using connectNative or using a websocket connection (i.e. implement a websocket server in the main jabref application, similar in spirit to https://github.com/karlicoss/grasp/blob/master/extension/src/js/background.js). Not sure what is easier to implement and more stable. I sadly don't have the time to work on it myself, but would of course accept PRs and help with the implementation. Such a connection would be also handy to implement other features. For example, #32. |
I often have the problem, that articles that are imported via the browser extension have linked PDFs, which I can not download via JabRef itself (for example via JabRef/jabref#5662 or by browsing to the PDF and then starting the browser extension). That might be because you have to be logged in into a website or due to other reasons. Some pages return an error 403 (sciencedirect, researchgate), others return 503 (wiley - maybe that one is a different problem though).
However, if I open the link in the browser, I get the PDF immediately.
Thus, it would be convenient to be able to download the PDF directly in the JabRef extension (so that it has the browser context and cookies (is that possible?)) and then send the downloaded PDF and metadata into Jabref.
edit: I quickly checked what's going on with wiley. The problem seems to be cloudflare. When I use wget or curl to access the PDF, I get immediately a 503 error and a html page which says at the bottom:
The text was updated successfully, but these errors were encountered: