Skip to content

Commit

Permalink
BC-8660 let libreoffice save larger documents
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Afro committed Jan 8, 2025
1 parent 17aecd5 commit 0e760fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/services/wopi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const hostCapabilitiesHelper = require('./utils/hostCapabilitiesHelper');
const filePostActionHelper = require('./utils/filePostActionHelper');
const handleResponseHeaders = require('../../middleware/handleResponseHeaders');
const { Configuration } = require('@hpi-schul-cloud/commons');
const bodyParser = require('body-parser');

const wopiPrefix = '/wopi/files/';

Expand Down Expand Up @@ -222,6 +223,8 @@ module.exports = function setup() {
app.use('/wopi/api', staticContent(path.join(__dirname, '/docs/openapi.yaml')));
app.use(`${wopiPrefix}:fileId/contents`, new WopiFilesContentsService(app), handleResponseHeaders);
app.use(`${wopiPrefix}:fileId`, new WopiFilesInfoService(app), handleResponseHeaders);
app.use(`${wopiPrefix}`, bodyParser.raw({ type: () => true, limit: Configuration.get('WOPI_MAX_FILE_SIZE') }));
app.use(`${wopiPrefix}`, bodyParser.urlencoded({ type: () => true, limit: Configuration.get('WOPI_MAX_FILE_SIZE') }));

const filesService = app.service(`${wopiPrefix}:fileId`);
const filesContentService = app.service(`${wopiPrefix}:fileId/contents`);
Expand Down

0 comments on commit 0e760fa

Please sign in to comment.