diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/viewer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/viewer.js b/src/viewer.js index 906affe8..197b1b1a 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -39,7 +39,7 @@ const odfViewer = { isCollaboraConfigured: typeof OC.getCapabilities().richdocuments.collabora === 'object' && OC.getCapabilities().richdocuments.collabora.length !== 0, supportedMimes: OC.getCapabilities().richdocuments.mimetypes.concat(OC.getCapabilities().richdocuments.mimetypesNoDefaultOpen), excludeMimeFromDefaultOpen: OC.getCapabilities().richdocuments.mimetypesNoDefaultOpen, - hideDownloadMimes: ['image/jpeg', 'image/svg+xml', 'image/cgm', 'image/vnd.dxf', 'image/x-emf', 'image/x-wmf', 'image/x-wpg', 'image/x-freehand', 'image/bmp', 'image/png', 'image/gif', 'image/tiff', 'image/jpg', 'image/jpeg', 'text/plain'], + hideDownloadMimes: ['image/jpeg', 'image/svg+xml', 'image/cgm', 'image/vnd.dxf', 'image/x-emf', 'image/x-wmf', 'image/x-wpg', 'image/x-freehand', 'image/bmp', 'image/png', 'image/gif', 'image/tiff', 'image/jpg', 'image/jpeg', 'text/plain', 'application/pdf'], register() { const EDIT_ACTION_NAME = 'Edit with ' + OC.getCapabilities().richdocuments.productName @@ -429,7 +429,7 @@ $(document).ready(function() { } // Open documents if a public page is opened for a supported mimetype - const isSupportedMime = isPublic && odfViewer.supportedMimes.indexOf($('#mimetype').val()) !== -1 + const isSupportedMime = isPublic && odfViewer.supportedMimes.indexOf($('#mimetype').val()) !== -1 && odfViewer.excludeMimeFromDefaultOpen.indexOf($('#mimetype').val()) === -1 const showSecureView = isPublic && isDownloadHidden && odfViewer.hideDownloadMimes.indexOf($('#mimetype').val()) !== -1 if (isSupportedMime || showSecureView) { odfViewer.onEdit(document.getElementById('filename').value) |