Merge branch hotfix/v7.4.1 into develop

This commit is contained in:
papacarlo
2023-08-01 08:17:16 +00:00
2 changed files with 4 additions and 3 deletions

View File

@ -3886,6 +3886,8 @@ exports.install = function(server, callbackFunction) {
if (-1 !== index || 0 === res.length) {
return editorData.connect().then(function() {
callbackFunction();
}).catch(err => {
operationContext.global.logger.error('editorData error: %s', err.stack);
});
} else {
operationContext.global.logger.error('DB table "%s" does not contain %s column, columns info: %j', tableName, tableRequiredColumn, res);
@ -3893,7 +3895,6 @@ exports.install = function(server, callbackFunction) {
}).catch(err => {
operationContext.global.logger.error('getTableColumns error: %s', err.stack);
});
});
});
};

View File

@ -126,7 +126,7 @@ if (configStorage.has('fs.folderPath')) {
const cfgStorageFolderName = configStorage.get('storageFolderName');
app.use('/' + cfgBucketName + '/' + cfgStorageFolderName, (req, res, next) => {
const index = req.url.lastIndexOf('/');
if ('GET' === req.method && -1 != index) {
if ('GET' === req.method && index > 0) {
let sendFileOptions = {
root: configStorage.get('fs.folderPath'), dotfiles: 'deny', headers: {
'Content-Disposition': 'attachment'
@ -145,7 +145,7 @@ if (configStorage.has('fs.folderPath')) {
}
});
} else {
res.sendStatus(404)
res.sendStatus(404);
}
});
}