Skip to content

Commit

Permalink
[wopi] Set 'edit' as default action for pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Sep 24, 2024
1 parent bf1456f commit c750dbc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DocService/sources/wopiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ function discovery(req, res) {
xmlApp.ele('action', {name: 'embedview', ext: ext.edit[j], urlsrc: urlTemplateEmbedView}).up();
xmlApp.ele('action', {name: 'mobileView', ext: ext.edit[j], urlsrc: urlTemplateMobileView}).up();
if (formsExts[ext.edit[j]]) {
xmlApp.ele('action', {name: 'formsubmit', ext: ext.edit[j], default: 'true', requires: 'locks,update', urlsrc: urlTemplateFormSubmit}).up();
xmlApp.ele('action', {name: 'edit', ext: ext.edit[j], requires: 'locks,update', urlsrc: urlTemplateEdit}).up();
xmlApp.ele('action', {name: 'edit', ext: ext.edit[j], default: 'true', requires: 'locks,update', urlsrc: urlTemplateEdit}).up();
xmlApp.ele('action', {name: 'formsubmit', ext: ext.edit[j], requires: 'locks,update', urlsrc: urlTemplateFormSubmit}).up();
} else {
xmlApp.ele('action', {name: 'edit', ext: ext.edit[j], default: 'true', requires: 'locks,update', urlsrc: urlTemplateEdit}).up();
}
Expand Down Expand Up @@ -258,8 +258,8 @@ function discovery(req, res) {
mimeTypes.forEach((value) => {
let xmlApp = xmlZone.ele('app', {name: value});
if (formsExts[ext.edit[j]]) {
xmlApp.ele('action', {name: 'formsubmit', ext: '', default: 'true', requires: 'locks,update', urlsrc: urlTemplateFormSubmit}).up();
xmlApp.ele('action', {name: 'edit', ext: '', requires: 'locks,update', urlsrc: urlTemplateEdit}).up();
xmlApp.ele('action', {name: 'edit', ext: '', default: 'true', requires: 'locks,update', urlsrc: urlTemplateEdit}).up();
xmlApp.ele('action', {name: 'formsubmit', ext: '', requires: 'locks,update', urlsrc: urlTemplateFormSubmit}).up();
} else {
xmlApp.ele('action', {name: 'edit', ext: '', default: 'true', requires: 'locks,update', urlsrc: urlTemplateEdit}).up();
}
Expand Down

0 comments on commit c750dbc

Please sign in to comment.