Show proper error if the file doesn't have a handler#570
Conversation
skjnldsv
commented
Aug 19, 2020

Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
| console.error('The following file could not be displayed', fileName, fileInfo) | ||
| showError(t('viewer', 'There is no plugin available to display this file type')) | ||
| this.close() | ||
| return |
There was a problem hiding this comment.
Is there a way to check that upfront as an app calling openFile?
There was a problem hiding this comment.
Unless we use the filename to detect type, unfortunately no.
I started by doing this, but in the end nextcloud server have different mimetypes than some libraries you can find (and apps can register custom ones)
Unless we have a dedicated service that allow us to match the mimetype against server, I don't see how I can do it without :/
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
93bf685 to
c9fe0b9
Compare