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.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?

  • Admin

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



Looks like your connection to NodeBB was lost, please wait while we try to reconnect.