mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 06:25:50 +01:00
move regex out
This commit is contained in:
@@ -12,10 +12,10 @@ module.exports = function (Posts) {
|
||||
|
||||
const md5 = filename => crypto.createHash('md5').update(filename).digest('hex');
|
||||
const pathPrefix = path.join(__dirname, '../../public/uploads/files');
|
||||
const searchRegex = /\/assets\/uploads\/files\/([^\s")]+\.?[\w]*)/g;
|
||||
|
||||
Posts.uploads.sync = function (pid, callback) {
|
||||
// Scans a post and updates sorted set of uploads
|
||||
const searchRegex = /\/assets\/uploads\/files\/([^\s")]+\.?[\w]*)/g;
|
||||
|
||||
async.parallel({
|
||||
content: async.apply(Posts.getPostField, pid, 'content'),
|
||||
|
||||
Reference in New Issue
Block a user