how to access meta.config.maximumFileSize in plugin client side js?
-
Hi.
Since nodebb-plugin-composer-redactor don't listen to meta.config.maximumFileSize and I need to restrict this a bit
I've modified redactor.js to this:
traverseFile: function(file, e) {
var maxFileSize = 1500 * 1024;
if(file.size > maxFileSize){
this.modal.close();
this.selection.restore();
this.core.setCallback('fileUploadError', 'file-size-error'); //needed?
return app.alertError('[errormessage]',20000);
}Is there a simple way to make maxFileSize contain the meta.config.maximumFileSize value instead?
Copyright © 2024 NodeBB | Contributors