Shared folder, can't preview files if download is disabled

Nextcloud version (eg, 20.0.5): 25.0.4
Operating system and version: Ubuntu 20.04
Apache or nginx version: Apache 2.4.41
PHP version : 7.4

The issue you are facing: I have a share folder with one video in it. I want poeple to be able to preview the video but not to share/download it. When I remove the option to Download, the file cannot be previewed by users (but I still can)

Is this the first time you’ve seen this error? : Yes

Steps to replicate it:

  1. Share folder to user group
  2. remove share and download option
  3. connect with a user account and try to preview the file in the browser

The output of your Nextcloud log in Admin > Logging:

[webdav] Erreur: OCA\DAV\Connector\Sabre\Exception\Forbidden: Access to this resource has been denied because it is in view-only mode. at <>

  1. /var/www/html/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    OCA\DAV\DAV\ViewOnlyPlugin->checkViewOnly()
  2. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
  3. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
  4. /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
  5. /var/www/html/nextcloud/apps/dav/lib/Server.php line 360
    Sabre\DAV\Server->exec()
  6. /var/www/html/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  7. /var/www/html/nextcloud/remote.php line 171
    require_once(“/var/www/html/n … p”)

GET /remote.php/dav/files/ehovington/VIDEO/CASE%20IH%2015s%20Grand%20Degel%202023%20(HD).mp4
from 10.6.128.77 by ehovington at 2023-03-07T14:05:38+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

‘datadirectory’ => ‘/var/www/html/nextcloud/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘25.0.4.1’,
‘overwrite.cli.url’ =>
‘dbname’ => ‘',
‘dbhost’ => '
’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘',
‘dbpassword’ => '
****’,
‘installed’ => true,
‘default_language’ => ‘fr’,
‘force_language’ => ‘fr’,
‘default_locale’ => ‘fr_CA’,
‘default_phone_region’ => ‘CA’,
‘force_locale’ => ‘fr_CA’,
‘defaultapp’ => ‘files’,
‘knowledgebaseenabled’ => false,
‘allow_user_to_change_display_name’ => false,
‘skeletondirectory’ => ‘’,
‘templatedirectory’ => ‘’,