mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #648] "View File"/"Edit File" options not working on *.pdf files #395
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @935r on GitHub (Oct 31, 2025).
Original GitHub issue: https://github.com/sigoden/dufs/issues/648
Problem
Expectation:
Clicking on the "Edit File"/"View File" option from a *.pdf file opens a PDF-Viewer and shows the PDF file.
Reality:
Clicking on the "Edit File"/"View File" option from a *.pdf file opens a PDF-Viewer (in dufs), but does not load anything. The viewer shows nothing.
(Clicking on the text of the *.pdf file in dufs actually opens the PDF-File in a new browser window without any issue.)
Configuration
Tested with the following for the option "Edit File": ./dufs -b 127.0.0.1 -A
Log
./dufs -b 127.0.0.1 -A
Listening on http://127.0.0.1:5000/
2025-10-31T18:13:40+01:00 INFO - 127.0.0.1 "GET /" 200
2025-10-31T18:13:45+01:00 INFO - 127.0.0.1 "GET /equipment.pdf?edit" 200
2025-10-31T18:13:46+01:00 INFO - 127.0.0.1 "GET /equipment.pdf" 304
Screenshots/Media
Environment Information
@sigoden commented on GitHub (Nov 3, 2025):
Whether a PDF can be displayed is up to the browser, not dufs.
@935r commented on GitHub (Nov 4, 2025):
The browser (tested with firefox 144.0.2 (64-bit) and chromium Version 142.0.7444.59 (Official Build)) can display it in a new tab, so it does not seem to be a functionality problem.
"http://127.0.0.1:5000/fancy_test.pdf" works on both browsers. "http://127.0.0.1:5000/fancy_test.pdf?edit" or "http://127.0.0.1:5000/fancy_test.pdf?view" does not work on both browsers.
Chromium gives the info "This page has been blocked by Chromium".
Is this a file access option which has to be enabled in the browser? Why is this needed, when it opens "http://127.0.0.1:5000/fancy_test.pdf" without issue?
I would really appreciate a short explanation or link. From Your reply im in the assumption, that you think, the browser does not have the capability to display the pdf-file.
@Mihara commented on GitHub (Nov 26, 2025):
I also happen to have the same issue: PDFs cannot be viewed, with exactly the same symptoms, even though the same PDFs can be viewed in the browser in other circumstances.
This seems like a bug in the frontend somewhere, or an extra requirement to the reverse proxy settings that we both don't know about...