Disable Video Playback in Shared Link

Hi Guys

We have disabled the Video Plugin to save some rescources on the Servers.

Moviefiles can only get downloaded and be watched on the maschine.

Now what we found out is, that if I share a Video directly via Link it can be watched completly via the shared link, without downloading it.

We want to disable this playback function but dont know where to do that.

we have nextcloud 12 with disabled video plugin.

to reproduce issue:

  1. upload video
  2. share video *.mp4 via link.
  3. share link with someone
  4. open shared link.
  5. play the uploaded video directly in the browser without downloading it.

On the app management page, you can limit the access to the video player app to certain groups. I’m not sure how this reacts for the sharing page, if it considers the group of the person who shared the files.

A dirty workaround could be that you share the video with a local user who can’t use the video plugin and let him create the shared links.

video plugin is totally disabled.

Hi all,

we’re having the same problem. Video player and Photo app is disabled.
But on public shared folders the video or photo opens as modal and shows the photo or plays the video.

In former versions it was just downloading the files when clicked on them.

How can we change that? We’re on NC 19.0.3

Thanks in advance!

I think in public share it is a download but it is shown in browser.

Nextcloud with a a logged in user (login to Nextcloud):
Nextcloud with public share (no login to Nextcloud):

On direct click on second link you get a download link.

You can test it in Mozilla Firefox network analysis (F12) or right click menu.

I think a bigger problem is the fact that nextcloud gui uses WebDAV and public share not.
Why can Nextcloud not use for logged in users normal web services? I do not understand it.
Perhpas than is the same behavior possible.

No, it’s not a download link that opens the file in browser:

It’s explicitly a link to open the file. But we want to share the files to download and not to watch. That’s how it has been in past versions.

Somehow it changed and now the link above is shown and the video (or photo) is displayed instead of immediately being downloaded.

As said before. In earlier versions you just disabled the video player and download started immediately. But it’s disabled.

Hi bg-Roland,

I had the same problem as described above on a NC 20.0.6 on a Debian 10 system.
The following solved the issue for me but it will disable video playback at all!
In a nutshell:
Erase all video-mime types from the NC mime-mapping.
Here are my steps:

  1. cd [Nextcloud-Dir] ; # in my case:

    cd /var/www/html/nextcloud
  2. edit ./resources/config/mimetypemapping.dist.json

[nano/vi] ./resources/config/mimetypemapping.dist.json

  • You will see something like this;

     "3gp": ["video/3gpp"],
     "7z": ["application/x-7z-compressed"],
     "accdb": ["application/msaccess"],
     "ai": ["application/illustrator"],
     "apk": ["application/vnd.android.package-archive"],
     "arw": ["image/x-dcraw"],
     "avi": ["video/x-msvideo"],
     "bash": ["text/x-shellscript"],
     "bat": ["application/x-msdos-program"],
     "blend": ["application/x-blender"],
  1. remove every line with ["video/…, so that the result is the following:

     "7z": ["application/x-7z-compressed"],
     "accdb": ["application/msaccess"],
     "ai": ["application/illustrator"],
     "apk": ["application/vnd.android.package-archive"],
     "arw": ["image/x-dcraw"],
     "bash": ["text/x-shellscript"],
     "bat": ["application/x-msdos-program"],
     "blend": ["application/x-blender"],
  2. copy the file to the config directory, that should prevent to loose the changes due to an update process

    sudo -u www-data cp ./resources/config/mimetypemapping.dist.json ./config/mimetypemapping.json
  3. switch maintenance mode on and off (I’m not sure, that this step is really needed, but that is what I did and my problem is solved)

    sudo -u www-data php occ maintenance:mode --on
    sudo -u www-data php occ maintenance:mode --off
  4. Restart the nextcloud (for apache installation)

    systemctl restart apache2

I hope this will help you too!