allen505 / save-for-later

A web extension for Chrome/Firefox which saves the tabs in current window for later use.
https://allen505.github.io/save-for-later/contribute
GNU General Public License v3.0
33 stars 11 forks source link

Save for later is unable to open files that are stored locally #9

Open miam-miam opened 3 years ago

miam-miam commented 3 years ago

Save for later is unable to open files that are stored locally and provides no response showing that the extension cannot do it. Is this just due to the fact that the api does not allow you to open local files?

allen505 commented 3 years ago

Hi @miam-miam100 , could you please share the URL to the file you are trying to save. The type of URLs saved by Save for Later are given in this line. It is a regex pattern used to match appropriate URLs.

miam-miam commented 3 years ago

Sure it seems to me to only be a normal file but I may be wrong: file:///D:/Documents/EPQ/Quantum_Computing_for_ComputerScientists-_Yanofsky-cup-2008.pdf

allen505 commented 3 years ago

Yes, I see your point @miam-miam100 . The extension saves the links but it does not open it. To open a local file the API used is different. This is definitely a bug on the extension's side.
Possible solution to open local files is in this Stackoverflow answer . Implementing this in the current code though seems a bit tricky. We'd have to distinguish local vs web links before opening it in this line