how to access meta.config.maximumFileSize in plugin client side js?

Plugin Development
  • 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.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?

  • It is available in the client side config object. You can use it as config.maximumFileSize

Suggested Topics