You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to extend the Viewer with a new file type. Unfortunately the file doesn't have a standardized MIME type. On Linux it is detected as application/octet-stream.
Describe the solution you'd like
Allow registering handlers based on file extensions as well:
OCA.Viewer.registerHandler({// unique idid: 'emf',// optional, it will group every view of this group and// use the proper view when building the file list// of the slideshow.// e.g. you open an image/jpeg that have the `media` group// you will be able to see the video/mpeg from the `video` handler// files that also have the `media` group set.group: 'media',// the list of mimes your component is able to displaymimes: [],fileExtensions: ['emf',],// your vue component viewcomponent: VideoView})
For me this would be for Viewer 3.0, where, following the same pattern as FileAction and NewFileEntry APIs, you can register conditional handlers with whatever you need. We would expose this as a library and only allow a Node with optional array of Node
newFileAction({
...
enabled(nodes: Node[]){// Only works on single nodeif(nodes.length!==1){returnfalse}return(nodes[0].permissions&Permission.UPDATE)!==0},
...
})
Is your feature request related to a problem? Please describe.
I would like to extend the Viewer with a new file type. Unfortunately the file doesn't have a standardized MIME type. On Linux it is detected as
application/octet-stream
.Describe the solution you'd like
Allow registering handlers based on file extensions as well:
Describe alternatives you've considered
N/a
Additional context
nextcloud/files_emfviewer#1 is the feature.
The text was updated successfully, but these errors were encountered: