Skip to content
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

Merged
merged 2 commits into from
Aug 29, 2020

Conversation

skjnldsv
Copy link
Member

Capture d’écran_2020-08-19_10-58-54

@skjnldsv skjnldsv added enhancement New feature or request 3. to review Waiting for reviews labels Aug 19, 2020
@skjnldsv skjnldsv added this to the Nextcloud 20 milestone Aug 19, 2020
@skjnldsv skjnldsv self-assigned this Aug 19, 2020
@cypress
Copy link

cypress bot commented Aug 19, 2020



Test summary

151 0 0 0


Run details

Project viewer
Status Passed
Commit 8d3f7d0 ℹ️
Started Aug 19, 2020 12:31 PM
Ended Aug 19, 2020 12:33 PM
Duration 01:58 💡
OS Linux Ubuntu Linux - 18.04
Browser Electron 78

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
Copy link
Member

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?

Copy link
Member Author

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 :/

@rullzer rullzer mentioned this pull request Aug 21, 2020
19 tasks
@rullzer rullzer mentioned this pull request Aug 27, 2020
21 tasks
Copy link
Member

@rullzer rullzer left a 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>
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Aug 29, 2020
@skjnldsv skjnldsv merged commit 4280f99 into master Aug 29, 2020
@skjnldsv skjnldsv deleted the enh/better-error-handling branch August 29, 2020 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants