nodebb-plugin-composer-default 10.2.5 → 10.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-composer-default",
3
- "version": "10.2.5",
3
+ "version": "10.2.6",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -78,7 +78,7 @@ define('composer/uploads', [
78
78
  route: '/api/post/upload',
79
79
  formData: upload.formData,
80
80
  });
81
- }
81
+ },
82
82
  });
83
83
  }
84
84
 
@@ -137,7 +137,7 @@ define('composer/uploads', [
137
137
  filenameMapping.push(i + '_' + Date.now() + '_' + (params.fileNames ? params.fileNames[i] : files[i].name));
138
138
  isImage = files[i].type.match(/image./);
139
139
 
140
- if (files[i].size > parseInt(config.maximumFileSize, 10) * 1024) {
140
+ if (!app.user.isAdmin && files[i].size > parseInt(config.maximumFileSize, 10) * 1024) {
141
141
  uploadForm[0].reset();
142
142
  return alerts.error('[[error:file-too-big, ' + config.maximumFileSize + ']]');
143
143
  }