-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to check that upfront as an app calling openFile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets do this!
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
93bf685
to
c9fe0b9
Compare