Skip to content

Node.js based forum software built for the modern web

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

Julian Lama04da673fa57
diff --git a/src/posts/uploads.js b/src/posts/uploads.js
index 229eaf2cfe..2f7d1a0b2f 100644
--- a/src/posts/uploads.js
+++ b/src/posts/uploads.js
@@ -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)));
};