mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
fix: #10690, all uploads in uploads/files showing orphaned
This commit is contained in:
@@ -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)));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user