added a hook to post image upload for starters, more coming

v1.18.x
Baris Soner Usakli 11 years ago
parent c78942b7a4
commit 0f2e7fa8bd

@ -396,6 +396,10 @@ var db = require('./database'),
Posts.uploadPostImage = function(image, callback) {
if(plugins.hasListeners('filter:post.upload')) {
plugins.fireHook('filter:post.upload', image, callback);
} else {
if(meta.config.imgurClientID) {
if(!image || !image.data) {
return callback(new Error('invalid image'));
@ -417,6 +421,7 @@ var db = require('./database'),
callback(new Error('Uploads are disabled!'));
}
}
}
Posts.uploadPostFile = function(file, callback) {

Loading…
Cancel
Save