Failure to open local file in windows platform
See original GitHub issueConfiguration:
- Web browser and its version:
Electron 1.7.8 ( use webpack and set
target: 'electron-renderer'
) - Operating system and its version: Windows 10
- PDF.js version: pdfjs-dist: 1.9.640
- Is an extension: no
Steps to reproduce the problem:
- try to open
C:/User/1234/Desktop/a.pdf
- window.location transform it to
file:///C:/User/1234/Desktop/a.pdf
- PDFNodeStreamFsFullReader get
/C:/User/1234/Desktop/a.pdf
- ENOENT: no such file or directory, lstat
C:\C:\User\1234\Desktop\a.pdf
What went wrong?
the pr https://github.com/mozilla/pdf.js/pull/8928 is not working
path before decodeURI
: /C:/User/1234/Desktop/a.pdf
. Howerver, after decodeURI
, path is still the same.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:8 (4 by maintainers)
Top Results From Across the Web
"Access Denied" or other errors when you access or work ...
Issue 1: You receive an "Access Denied" error message or a similar message. Issue 2: You cannot access, change, save, or delete files...
Read more >Miscellaneous Box Drive Error Notifications
To find a list of any problem file notifications: Click the Box icon in your menu bar or system tray to open the...
Read more >[Solved] Access Denied When Copying Files Windows 10/8/7
Solution 2: Change File and Folder Permission (Give Full Control). This error may be related to permission. Permissions determine whether you ...
Read more >Fix problems in Drive for desktop - Computer
Fix error messages · You aren't connected to the internet. You don't have any available drive letters (Windows only). Your proxy settings don't...
Read more >Workable Fixes to Can't Read from Source File or Disk Error
If you can't read from the source file or disk Windows 10 and this is disturbing the normal functioning of your PC, have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@matteodem It’s not possible to use the fetch api to load local files via
file protocol
. However, the pdf.js supports reading local files if you are in NodeJS environment.@juncaixinchi …so this means this is not possible? as in the original issue is unresolved / unresolvable?