From e880145b6c6ceb3f0938089425de1eabff85b78b Mon Sep 17 00:00:00 2001 From: lonesomewalker Date: Mon, 7 Apr 2025 21:33:10 +0200 Subject: [PATCH] Update importexport.ts - fixes 4805 This changes the export from doc to docx. A lot of other projects (like BBB) rely on etherpad lite, but nobody seemed to care about :-) --- src/node/hooks/express/importexport.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/hooks/express/importexport.ts b/src/node/hooks/express/importexport.ts index 898606e49..0f3a27c50 100644 --- a/src/node/hooks/express/importexport.ts +++ b/src/node/hooks/express/importexport.ts @@ -28,7 +28,7 @@ exports.expressCreateServer = (hookName:string, args:ArgsExpressType, cb:Functio args.app.use('/p/:pad/:rev?/export/:type', limiter); args.app.get('/p/:pad/:rev?/export/:type', (req:any, res:any, next:Function) => { (async () => { - const types = ['pdf', 'doc', 'txt', 'html', 'odt', 'etherpad']; + const types = ['pdf', 'docx', 'txt', 'html', 'odt', 'etherpad']; // send a 404 if we don't support this filetype if (types.indexOf(req.params.type) === -1) { return next(); @@ -36,7 +36,7 @@ exports.expressCreateServer = (hookName:string, args:ArgsExpressType, cb:Functio // if abiword is disabled, and this is a format we only support with abiword, output a message if (settings.exportAvailable() === 'no' && - ['odt', 'pdf', 'doc'].indexOf(req.params.type) !== -1) { + ['odt', 'pdf', 'docx'].indexOf(req.params.type) !== -1) { console.error(`Impossible to export pad "${req.params.pad}" in ${req.params.type} format.` + ' There is no converter configured');