-
-
Notifications
You must be signed in to change notification settings - Fork 853
Description
Describe the bug
The viewableInBrowserObjects configuration does not work correctly for links created in text blocks. Even with the configuration set to open files in the browser, links created in text blocks continue to generate download URLs (@@download/file) instead of display URLs (@@display-file/file), causing files to be downloaded instead of opened in the browser when the user is anonymous.
To Reproduce
Steps to reproduce the behavior:
- Configure
viewableInBrowserObjects: ['File']in the Volto configuration file. - Create a file.
- Create a page with a text block.
- In the text block, create a link that points to the created file.
- Access the page as an anonymous user.
- Click on the file link
- Observe that the file is downloaded instead of being opened in the browser.
Expected behavior
When viewableInBrowserObjects is configured with ['File'], links to files should open in the browser instead of being downloaded, especially when created in text blocks. The generated URL should be @@display-file/file instead of @@download/file for anonymous users.
Software (please complete the following information):
- OS: Linux
- Browser: chrome
- Volto Version: 19
- Plone Version 6.1.3
Additional context
In the listing block, this setting works. It seems the setting was designed for the listing block only.