forked from nextcloud/viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Mk/dev/cherrypick ionos dev to v31.0.6 #39
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
Draft
printminion-co
wants to merge
22
commits into
mk/dev/ionos-dev31
Choose a base branch
from
mk/dev/cherrypick-ionos-dev-to-v31.0.6
base: mk/dev/ionos-dev31
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Mk/dev/cherrypick ionos dev to v31.0.6 #39
printminion-co
wants to merge
22
commits into
mk/dev/ionos-dev31
from
mk/dev/cherrypick-ionos-dev-to-v31.0.6
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enable via: ./occ config:app:set --value yes --type string viewer always_show_viewer Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
3bbc6e8 to
f8ef002
Compare
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
in order later to use it as default viewer Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
in order later to display it for all not known mime types Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
f8ef002 to
7fdec4f
Compare
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
in order to reuse it later Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
7fdec4f to
393d158
Compare
Signed-off-by: Franziska Bath <franziska.bath@strato.de>
in order to be able to influence it later Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
…efault component Signed-off-by: Franziska Bath <franziska.bath@strato.de> Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
…hown Signed-off-by: Franziska Bath <franziska.bath@strato.de>
Don't include directories as they can not be displayed. Note: including directories could also cause a follow-up error with certain directory structures which happen to include a directory named like a number (i.e. 123) because of sloppy, too broad type casting in fileUtils.ts's genFileInfo() accidentally converting such a folder name to a Number, which then can not be used in string comparisons. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
Signed-off-by: Kai Henseler <kai.henseler@strato.de> Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> # Conflicts: # src/views/Viewer.vue
Reference the default mimetype from the config module, don't add a magic string. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
== The bug The app config "always_show_viewer" enables the preview for all mimetypes. If this config is not set and no handler is registered for a mimetype, the file will be downloaded. In the share/public view, with this config enabled some file types were downloaded instead of opened in the preview. The code would not progress up to Viewer's openFileInfo() because it would not find a preview component candidate in [1] to even attempt opening the preview. == The fix As per reverse engineering it was found that special string "all" is used as symbol for handling any mimetype (at least in [2]). The decision was made to change the special mimetype for a registered previewer to "all", because then handling any file is already coverered this way. All discovered places: 1. Files/fileactions: getDefaultFileAction() [2] 2. Shares: attach(), "fileActionsReady" event handler, registerAction() call [3] [1]: https://github.com/nextcloud/server/blob/v29.0.6/apps/files/js/filelist.js#L912 [2]: https://github.com/nextcloud/server/blob/v29.0.6/apps/files/js/fileactions.js#L315 [3]: https://github.com/nextcloud/server/blob/v29.0.6/apps/files_sharing/src/share.js#L230 Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
Another state will be added and this prepares for a consistent naming pattern.t Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
== The cause Previously the code attempted to load a preview of an image. If loading this preview image failed it was attempted to load the original image. Load errors of images were only handled _once_. This meant that a load error for the original image was never handled, thus the viewer was still in loading state and showed a browser-dependant "broken image" replacement icon. == The fix Now further image load errors are handled too. In case the original fails too, the loading state is ended and a placeholder text is shown. The default preview component, which was introduced to show something for any mimetype if configured, is now also used as a fallback. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de>
Signed-off-by: Tatjana Kaschperko Lindt <kaschperko-lindt@strato.de> Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Signed-off-by: Franziska Bath <franziska.bath@strato.de>
Signed-off-by: Franziska Bath <franziska.bath@strato.de>
Signed-off-by: Franziska Bath <franziska.bath@strato.de>
1577859 to
8ffe90b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.