filter:uploadImage and filter:uploadFile changes

NodeBB Development
  • If you have any plugins that use filter:uploadImage or filter:uploadFile please read below on the changes coming in 0.6.0. If you have any questions about how to update to the new hooks please feel free to ask.


    filter:uploadImage used to take only a single parameter was either an object referencing an upload file or an object that had an url to a external image. The uid of the user uploading the image has been added.

    plugins.fireHook('filter:uploadImage', {image: image, uid: uid}, callback);


    plugins.fireHook('filter:uploadImage', {image: {url: url}, uid: uid}, callback);

    See nodebb-plugin-imgur to see how to handle this hook


    Same as above the uid of the user making the upload has been added.

    plugins.fireHook('filter:uploadFile', {file: file, uid: uid}, callback);

  • This post is deleted!

Suggested Topics