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

PDF files no longer open properly #2375

Open
sage-etcher opened this issue Jan 25, 2024 · 1 comment
Open

PDF files no longer open properly #2375

sage-etcher opened this issue Jan 25, 2024 · 1 comment
Labels

Comments

@sage-etcher
Copy link

  • Min Version: 1.31.1
  • Operating system: Windows 10

Expected Behavior

Opening a local pdf file with Min should let you view the file.

Actual Behavior

Instead, the browser instantly prompts to save the file, upon canceling the download the file never loads.

To Reproduce

Open a locally saved pdf file using Min.

@PalmerAL
Copy link
Collaborator

I looked into this a bit, and this is a result of 9efaf3b. Specifically, this doesn't work: https://github.com/minbrowser/min/blob/master/main/download.js#L102 because Chromium blocks fetch calls to local files before we ever get a response.

We probably need to add a custom method for the PDF viewer to read local files. We need to be careful to do this in a secure way though (ie we need to ensure that requests really come from the PDF viewer so we don't accidentally expose this capability to other pages).

@sage-etcher sage-etcher changed the title PDF files don't open correctly anymore PDF files no longer open properly Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants