Skip to content
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

does not work with ftp files (1.8.557 latest version for Chrome) #8926

Closed
yashamon opened this issue Sep 18, 2017 · 5 comments
Closed

does not work with ftp files (1.8.557 latest version for Chrome) #8926

yashamon opened this issue Sep 18, 2017 · 5 comments

Comments

@yashamon
Copy link

Link to PDF file (or attach file here): ftp://ftp.fernuni-hagen.de/pub/pdf/urz-broschueren/broschueren/a0279510.pdf
Configuration:

  • Web browser and its version: Chrome 61.0.3163.91
  • Operating system and its version: OSX 10.12.6
  • PDF.js version: 1.8.557
  • Is an extension: yes

Steps to reproduce the problem:

  1. Go to ftp pdf like ftp://ftp.fernuni-hagen.de/pub/pdf/urz-broschueren/broschueren/a0279510.pdf2.
    Get unexpected server error.

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

@yashamon
Copy link
Author

yashamon commented Oct 8, 2017

So I am guessing chrome users are kind of second class citizens in this case :(

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Oct 8, 2017

According to https://bugs.chromium.org/p/chromium/issues/detail?id=435547#c46, this is an upstream issue in Google Chrome itself rather than in the PDF.js extension.

@Rob--W
Copy link
Member

Rob--W commented Mar 21, 2018

I'm going to disable ftp support for Chrome 59+ because of the upstream Chrome issue.

I can think of a work-around to enable FTP display anyway, but I am not sure if that is worth the effort. @yashamon Would it be an acceptable solution for you to be able to open ftp PDFs in Chrome (either with the built-in viewer, if any, or as a download + drag file to Chrome)?

The work-around that I am thinking of relies on the fact that Chrome only allows ftp:-requests from ftp:-URLs:

  1. Find any tab with the ftp: scheme.
  2. If not found, open a temporary (inactive) tab with a ftp: URL.
  3. Let the extension run a content script in the tab (from 1 or 2), and let that script fetch the ftp:-resource.
  4. Send back the response to the original tab and show the PDF.

Now, if there is an existing tab with a ftp:-URL, then this work-around would barely have any noticeable difference when compared with the pre-Chrome 59 method. But if there is not such a tab (which I fully expect), then opening a tab can be confusing. But that confusion might be worth it, if the alternative is to not have an easy way to display PDF files.

@timvandermeij
Copy link
Contributor

Closing since #9595 is merged.

@Rob--W
Copy link
Member

Rob--W commented Nov 12, 2018

FYI: Upstream bug report to request access to ftp URLs: https://bugs.chromium.org/p/chromium/issues/detail?id=904455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants