fix: #10690, all uploads in `uploads/files` showing orphaned

isekai-main
Julian Lam 3 years ago
parent 7f870beb59
commit a04da673fa

@ -89,7 +89,7 @@ module.exports = function (Posts) {
filePaths = [filePaths]; filePaths = [filePaths];
} }
const keys = filePaths.map(fileObj => `upload:${md5(fileObj.name.replace('-resized', ''))}:pids`); const keys = filePaths.map(fileObj => `upload:${md5(fileObj.path.replace('-resized', ''))}:pids`);
return await Promise.all(keys.map(k => db.getSortedSetRange(k, 0, -1))); return await Promise.all(keys.map(k => db.getSortedSetRange(k, 0, -1)));
}; };

Loading…
Cancel
Save