mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-05 00:29:48 +03:00
Attachment are always triggerd to download #1198
Closed
opened 2026-02-05 00:14:05 +03:00 by OVERLORD
·
12 comments
No Branch/Tag Specified
development
l10n_development
further_theme_development
release
llm_only
vectors
v25-11
docker_env
drawio_rendering
user_permissions
ldap_host_failover
svg_image
prosemirror
captcha_example
fix/video-export
v25.12.3
v25.12.2
v25.12.1
v25.12
v25.11.6
v25.11.5
v25.11.4
v24.11.4
v25.11.3
v25.11.2
v25.11.1
v25.11
v25.07.3
v25.07.2
v25.07.1
v25.07
v25.05.2
v25.05.1
v25.05
v25.02.5
v25.02.4
v25.02.3
v25.02.2
v25.02.1
v25.02
v24.12.1
v24.12
v24.10.3
v24.10.2
v24.10.1
v24.10
v24.05.4
v24.05.3
v24.05.2
v24.05.1
v24.05
v24.02.3
v24.02.2
v24.02.1
v24.02
v23.12.3
v23.12.2
v23.12.1
v23.12
v23.10.4
v23.10.3
v23.10.2
v23.10.1
v23.10
v23.08.3
v23.08.2
v23.08.1
v23.08
v23.06.2
v23.06.1
v23.06
v23.05.2
v23.05.1
v23.05
v23.02.3
v23.02.2
v23.02.1
v23.02
v23.01.1
v23.01
v22.11.1
v22.11
v22.10.2
v22.10.1
v22.10
v22.09.1
v22.09
v22.07.3
v22.07.2
v22.07.1
v22.07
v22.06.2
v22.06.1
v22.06
v22.04.2
v22.04.1
v22.04
v22.03.1
v22.03
v22.02.3
v22.02.2
v22.02.1
v22.02
v21.12.5
v21.12.4
v21.12.3
v21.12.2
v21.12.1
v21.12
v21.11.3
v21.11.2
v21.11.1
v21.11
v21.10.3
v21.10.2
v21.10.1
v21.10
v21.08.6
v21.08.5
v21.08.4
v21.08.3
v21.08.2
v21.08.1
v21.08
v21.05.4
v21.05.3
v21.05.2
v21.05.1
v21.05
v21.04.6
v21.04.5
v21.04.4
v21.04.3
v21.04.2
v21.04.1
v21.04
v0.31.8
v0.31.7
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2
v0.31.1
v0.31.0
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3
v0.30.2
v0.30.1
v0.30.0
v0.29.3
v0.29.2
v0.29.1
v0.29.0
v0.28.3
v0.28.2
v0.28.1
v0.28.0
v0.27.5
v0.27.4
v0.27.3
v0.27.2
v0.27.1
v0.27
v0.26.4
v0.26.3
v0.26.2
v0.26.1
v0.26.0
v0.25.5
v0.25.4
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.2
v0.23.1
v0.23.0
v0.22.0
v0.21.0
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.0
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.15.3
v0.15.2
v0.15.1
v0.15.0
v0.14.3
v0.14.2
v0.14.1
v0.14.0
v0.13.1
v0.13.0
v0.12.2
v0.12.1
v0.12.0
v0.11.2
v0.11.1
v0.11.0
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.6
v0.7.5
v0.7.4
v0.7.3
0.7.2
v.0.7.1
v0.7.0
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
Labels
Clear labels
🎨 Design
📖 Docs Update
🐛 Bug
🐛 Bug
:cat2:🐈 Possible duplicate
💿 Database
☕ Open to discussion
💻 Front-End
🐕 Support
🚪 Authentication
🌍 Translations
🔌 API Task
🏭 Back-End
⛲ Upstream
🔨 Feature Request
🛠️ Enhancement
🛠️ Enhancement
🛠️ Enhancement
❤️ Happy feedback
🔒 Security
🔍 Pending Validation
💆 UX
📝 WYSIWYG Editor
🌔 Out of scope
🔩 API Request
:octocat: Admin/Meta
🖌️ View Customization
❓ Question
🚀 Priority
🛡️ Blocked
🚚 Export System
♿ A11y
🔧 Maintenance
> Markdown Editor
No Label
☕ Open to discussion
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/BookStack#1198
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking 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 @JtheBAB on GitHub (May 24, 2019).
Describe the bug
When clicking to a attachment it always offers to download instead of using the default browser settings.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Bookstack should respect the default behavior of the browser. In my case open the PDF with the inbuild PDFReader from FireFox.
Your Configuration (please complete the following information):
@ssddanbrown commented on GitHub (May 25, 2019):
Thanks for the report @JtheBAB.
To be honest this is purposeful, to standardise how all attachments are handled. As soon as you stop forcing this behaviour it becomes unreliable as different file types will behave differently then this is multiplied by how browsers will handle those different file types in a different manner.
@JtheBAB commented on GitHub (May 27, 2019):
Hi @ssddanbrown
I see your point. But i think it would be better when the user settings are respected.
It came just now in my mind:
I don't know how complicated it is but why not add a setting on the "edit profile" page to control if it should be forced (default) or free?
@ssddanbrown commented on GitHub (May 27, 2019):
The trouble is, that it's often not up to the user. It's often up the browser and the overall users' system.
Would not be complicated to add but extra settings can be a burden on maintenance & support while opening the floodgates to more settings. Additionally, I'd imagine that admins in many multi-user environments would prefer consistency over user preference.
Perhaps we can look at achieving this in a different manner. The attachment link behaviour could stay as-is but have a little dropdown icon next to the attachment to select download type, Or a key modifier so a ctrl+click (Default open in new tab shortcut) opens it using browser behaviour.
@JtheBAB commented on GitHub (May 27, 2019):
Sounds good :)
@mattkerrison commented on GitHub (Sep 30, 2019):
Please implement this! PDFs just download instead of opening in a new tab, it’s so painful
@APlueckthun commented on GitHub (Apr 28, 2020):
It would be extremely (!) appreciated by all of the users of BookStack in our place, if PDFs can be viewed inline, as opposed to being dowloaded.
Why is this so important? We typically link scientific papers as PDFs, and without opening it, you cannot know whether this paper contains what you want. At the end, the download folder is full of PDFs. Conversely, if the PDF is opened inline, you can choose to download it, or let it disappear once the browser is closed.
We consider this the single biggest drawback of BookStack! And it would probably be easy to implement! And you would make a large numbers of users happy!
@APlueckthun commented on GitHub (May 10, 2020):
Any way this is implemented is good. Whether this via the default browser setting or via an individual icon next to the link (download / inline view), both would be fine.
But please implement this.
@rfrye commented on GitHub (Aug 3, 2020):
I agree that the force download of PDF is a pain point for me. I dont have the solution for you, maybe a dropdown menu like you mentioned. Just wanted to be a voice that says its a pain point.
Love Bookstack
@APlueckthun commented on GitHub (Aug 4, 2020):
The resistance against implementing this change comes from the desire to treat all attachments the same. But this is the source of all misunderstanding. While most file types (.xlsx, .doc., or attached text files of any denomination) make no sense with anything else but download, PDFs are fundamentally different. PDFs are typically to be looked at, read, and not edited or worked upon. This is the very reason why many browsers have options to view them inline.
The only thing we are asking for is to not overwrite this feature of the browser.
And to only do this for the file type PDF.
And if a browser does not support in line viewing, or the user has set other preferences, it gets downloaded anyway, so where is the damage?
If one is using BookStack for linking to lots of PDFs for the user to read up in depth on certain points, why prevent doing this in line? Why force the user to clutter his download folder with lots of PDFs, which then become unlinked to the original BookStack entry?
I still hope this can be rectified. I just cannot discover any harm when treating PDFs separately from other file types, if the user has set his browser preferences accordingly.
Many thanks for reconsidering this! It would GREATLY enhance BookStacks (which is really great otherwise).
@ssddanbrown commented on GitHub (Jun 13, 2021):
Within BookStack v21.05.2 it's now possible to open up attachments in an "inline" (Not forced download) via Ctrl+Click of the attachment (Or Cmd+click on Mac). Alternatively, an attachment link of this type can be manually formed by adding an
?open=truequery parameter to the link.I'd still like to add some UI to the attachment items themselves so the access type can be chosen more intuitively (With better accessibility) but I could not come up with an approach I was happy with right now, Will need to have a deeper think about this from a design/accessibility perspective.
@npankaj365 commented on GitHub (Aug 30, 2022):
For anyone wanting to loading PDF on side, I created the following snippet that implements what @ssddanbrown has shared.
Sharing it here for reference if anyone's struggling. Placing this inside Custom HTML Head Content does the job.
@ssddanbrown commented on GitHub (Aug 30, 2022):
I'm going to go ahead and close this off as the agreed upon implementation, as per my comment above, was essentially added as of v22.06.