viewer icon indicating copy to clipboard operation
viewer copied to clipboard

[feature] Allow multiple handlers for same mime type and show selector

Open Yetangitu opened this issue 7 years ago • 6 comments

If multiple handlers are registered for the same mime types, open a selector to choose which one to use.


Original report:

Now that I implemented PDF support in Reader the need for an official way to select which app to use to handle a give mime type is starting to become an issue. Both NC and OC have an 'official' PDF viewer which does its job quite well and which might for one reason or another be preferred by Reader users over the version I implemented (even though Reader supports things like 2-page spread, position saving, night mode and bookmarks which the official/Mozilla viewer lacks). I could just add a personal preference section to allow users to choose which mime types Reader should handle but that is not a good solution in the light of a multitude of apps all handling the same mime type.

NC (and OC) need a mime type handler selector in the lines of the one used in Firefox:

image

Is something like this in the works?

Yetangitu avatar Jan 29 '18 22:01 Yetangitu

I think this is related to the discussion in https://github.com/nextcloud/files_texteditor/issues/15 .

If you read the comment of @tYYGH on 23 Nov 2017, a part of the solution could be a "mime type handler selector"

Spartachetto avatar Feb 05 '18 16:02 Spartachetto

This should be strongly related to nextcloud/server#7098.

Spartachetto avatar Feb 11 '18 21:02 Spartachetto

I suppose this issue is still valid? If not, please close this issue!

szaimen avatar May 21 '21 10:05 szaimen

Any work in this, please? It is very necessary if you use Collabora and OnlyOffice.

rosa2 avatar Jan 18 '22 11:01 rosa2

In the meantime and if it can help some people, it is possible to disable the default opening by richdocuments of doc, docx, xls, xlsx, ... by commenting the following lines in the file custom_apps/richdocuments/lib/Capabilities.php:

public const MIMETYPES = [
                'application/vnd.oasis.opendocument.text',
                'application/vnd.oasis.opendocument.spreadsheet',
                'application/vnd.oasis.opendocument.graphics',
                'application/vnd.oasis.opendocument.presentation',
                'application/vnd.oasis.opendocument.text-flat-xml',
                'application/vnd.oasis.opendocument.spreadsheet-flat-xml',
                'application/vnd.oasis.opendocument.graphics-flat-xml',
                'application/vnd.oasis.opendocument.presentation-flat-xml',
                //'application/vnd.lotus-wordpro',
                //'application/vnd.visio',
                //'application/vnd.ms-visio.drawing',
                //'application/vnd.wordperfect',
                //'application/msonenote',
                //'application/msword',
                'application/rtf',
                'text/rtf',
                //'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
                //'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
                //'application/vnd.ms-word.document.macroEnabled.12',
                //'application/vnd.ms-word.template.macroEnabled.12',
                //'application/vnd.ms-excel',
                //'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
                //'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
                //'application/vnd.ms-excel.sheet.macroEnabled.12',
                //'application/vnd.ms-excel.template.macroEnabled.12',
                //'application/vnd.ms-excel.addin.macroEnabled.12',
                //'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
                //'application/vnd.ms-powerpoint',
                //'application/vnd.openxmlformats-officedocument.presentationml.presentation',
                //'application/vnd.openxmlformats-officedocument.presentationml.template',
                //'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
                //'application/vnd.ms-powerpoint.addin.macroEnabled.12',
                //'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
                //'application/vnd.ms-powerpoint.template.macroEnabled.12',
                //'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
                'text/csv'
        ];

In this way, OnlyOffice will take over the task of opening file with extensions OpenXML, doc, xls, ...

jmchantrein avatar Mar 16 '23 14:03 jmchantrein

There are two problems:

  1. If we have multiple default file actions, this is a server issue and handled there: https://github.com/nextcloud/server/issues/5065
  2. If we have multiple handlers on the viewer for the same mime type, this is handled by this issue.

susnux avatar Aug 07 '24 16:08 susnux