mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 05:55:48 +01:00
proper handling of extensionless files
This commit is contained in:
@@ -9,7 +9,7 @@ module.exports = function (Posts) {
|
||||
|
||||
Posts.uploads.sync = function (pid, callback) {
|
||||
// Scans a post and updates sorted set of uploads
|
||||
const searchRegex = /\/assets\/uploads\/files\/([^\s]+\.[\w]+)/g;
|
||||
const searchRegex = /\/assets\/uploads\/files\/([^\s")]+\.?[\w]*)/g;
|
||||
|
||||
async.parallel({
|
||||
content: async.apply(Posts.getPostField, pid, 'content'),
|
||||
|
||||
Reference in New Issue
Block a user