Not possible to disable video player (viewer)

Is there way how to specify MIME types in config/config.php or in admin settings which schould be used in apps/viewer (photos and videos viewer)?

My goal is to do not open this viewer for all videos after clic on the file. (just only pictures should use it)

My nextCloud is 19.0.0
apps/viewer version 1.3.0

Or is there another way how to reach this functionality?

/path/to/nextcloud/core/shipped.json, remove viewer under “alwaysEnabled” to make possible to disable it in appstore.

1 Like

Okay I found a way to disable the “viewer” app.

  1. As mentioned by @BraveSail you need to remove the “viewer” in the core/shipped.json file.
  2. Then you will be able to see the Viewer in your app web UI. You can go ahead and disable it in the UI.

Is there a possibility to disable the “viewer” only for public downloads and set a Group and only enable it for Users?

I think not. But you can modify the link:

Link with preview: Nextcloud
Link to download:

If i get the second link (e.g. from e-mail) i would not test the link without “/download”.
Because of Javascript i think there is also no big performance issue for playing video in Nextcloud. The video must be downloaded in both cases. In Nextcloud perhaps not the full video.

1 Like

Thank you for your help.
I run NC on a Raspberry PI4 and if the Users start to play the Video, they only hear the Sound so i want to prevent the Video Playback.
Could i do this with changing the mimetypes for example?

I wouldn’t mind if users saw a black video. At some point, they will probably notice that something is missing.

Changing Mime-Types is good.


server/mimetypemapping.dist.json at master · nextcloud/server · GitHub
Raw File:

Folder: /pfad/zur/nextcloud/resources/config

Destination file name: mimetypemapping.json
(do not use orgin file because of nextcloud updates)

"mp4": ["video/mp4"],
can perhaps changed to
"mp4": ["application/octet-stream"],
(see e.g. mime-type from swf)

OK i copied mimetypemapping.dist.json to resources/config and named it mimetypemapping.json.
But when i change the mp4 Parameter to this for example: [“application/internet-shortcut”] and then run this command: occ maintenance:mimetype:update-js
the settings should be active, right?
But when i click on an mp4 File the Video Playback starts again…

Sorry. I think it is the wrong destination path:


Instead, create your own nextcloud/config/mimetypealiases.json file with your custom aliases.

Sorry. I think it is the wrong destination path … not “resources” … my fault.


Instead, create your own nextcloud/config/mimetypealiases.json file with your custom aliases.

OK so i made an extra File in this directory nextcloud/config/mimetypealiases.json
But the Changes do not affect, maybe i am doing it wrong?
The Content of the File looks like this:

"mp4": ["application/internet-shortcut"]

Sorry no real idea. Perhaps you can delete/remove the old file that Nextcloud must use the new file.

OK that helped but can i link the /download Asset when i click on that file?

Now i got it!
The Content of the File stayed the same and when i deleted my Files and reuploaded they now get downloaded directly.
Thank you for your help @devnull :slight_smile:

OK it works on my Desktop Browser and on my iPhone at Safari and not in FF or Chrome on mobile Devices. I don’t get it but i think that’s enough for me ^^

Perhaps a problem of mime-type

That also don’t work for me.
Even when i delete every Entry with “video” in that file the results don’t change.
That’s a little frustrating ^^

Hi, sorry if I rewrite this old topic …
is there anyone who has managed to solve the problem? …
I too would like to completely disable the streaming video display but even after disabling the NextCloud app player and setting the Mime-Type as suggested by the previous posts Nextcloud continues to display the videos. I would like to make sure to only allow file downloads and not streaming viewing. Is it possible that there is no way to block this function?

I solved. After applying the changes mentioned in the previous posts of this topic I ran a scan with the command:
sudo -u www-data / var / www / nextcloud / occ files: scan --all

1.Copy alias :

sudo cp /usr/share/nginx/nextcloud/resources/config/mimetypealiases.dist.json /usr/share/nginx/nextcloud/config/mimetypealiases.json

2.Copy mapping :

sudo cp /usr/share/nginx/nextcloud/resources/config/mimetypemapping.dist.json /usr/share/nginx/nextcloud/config/mimetypemapping.json

  1. Update mimestype:

sudo -u www-data php /usr/share/nginx/nextcloud/occ maintenance:mimetype:update-js

after restart web server :

sudo service nginx restart

  1. Edit and change mapping :

sudo nano /usr/share/nginx/nextcloud/config/mimetypemapping.json

you want directly download ex :

"mkv": ["video/x-matroska"],


"mkv": ["application/octet-stream"],

avi mp4 etc …

  1. Update existing files mapping :

sudo -u www-data php /usr/share/nginx/nextcloud/occ files:scan --all

  1. refresh user browser

et voila …