Trigger download from fileactions if no default action is found
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
0df5110127
commit
1c5c44be3f
|
@ -829,6 +829,10 @@
|
||||||
var type = this.fileActions.getCurrentType();
|
var type = this.fileActions.getCurrentType();
|
||||||
var permissions = this.fileActions.getCurrentPermissions();
|
var permissions = this.fileActions.getCurrentPermissions();
|
||||||
var action = this.fileActions.getDefault(mime,type, permissions);
|
var action = this.fileActions.getDefault(mime,type, permissions);
|
||||||
|
if (typeof action === 'undefined' && type === 'file') {
|
||||||
|
var actions = this.fileActions.get(mime,type, permissions);
|
||||||
|
action = actions['Download'];
|
||||||
|
}
|
||||||
if (action) {
|
if (action) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// also set on global object for legacy apps
|
// also set on global object for legacy apps
|
||||||
|
|
Loading…
Reference in New Issue