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

use default app for external apps when not specifying one #5962

Closed
wkloucek opened this issue Oct 29, 2021 · 1 comment · Fixed by #5970
Closed

use default app for external apps when not specifying one #5962

wkloucek opened this issue Oct 29, 2021 · 1 comment · Fixed by #5970
Labels
Type:Bug Something isn't working

Comments

@wkloucek
Copy link
Contributor

wkloucek commented Oct 29, 2021

Bug description

// TODO: Make user-configurable what is a defaultAction for a filetype/mimetype
// returns the _first_ action from actions array which we now construct from
// available mime-types coming from the app-provider and existing actions
$_fileActions_triggerDefaultAction(resource) {
const actions = this.$_fileActions_getAllAvailableActions(resource).filter(
(action) => action.canBeDefault
)
actions[0].handler(resource, actions[0].handlerData)
},

If a user clicks on a file, which can be opened by multiple external apps, it will be opened with the first one in the internal array. This is quite random to a user and false in the sense, that oCIS knows about default apps (configurable by an admin atm).

Opening a file with the default app is done by calling /app/open without a app_name query parameter.
Additionally we also could add this information on the /app/list endpoint, which application is the default, if this is helpful to you.

Originally posted by @wkloucek in #5805 (comment)

@wkloucek wkloucek added the Type:Bug Something isn't working label Oct 29, 2021
@kulmann
Copy link
Member

kulmann commented Nov 2, 2021

Good one. And an easy fix: if at least one app for a mimetype: call /app/open, if no app available for the mimetype: don't use the app provider. :trollface:

If think we don't need the default info in the /app/list endpoint, but sorting or an app weight/prio would be helpful. I think there was another ticket about that, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants