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

This commit is contained in:
Julian Lam
2022-06-10 15:29:18 -04:00
parent 7f870beb59
commit a04da673fa

View File

@@ -89,7 +89,7 @@ module.exports = function (Posts) {
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)));
};