There are a few methodology issue I have here right now. The biggest being that the upload hook fires before a post is posted. This means files that aren't uploaded ( edited out after uploading ) with the post get stored.
I need to sort out how to move this to the post hook and process that instead. Learning curve and all.
For the moment, this works well enough for the other work I need so I'll be more focused that way for a bit, but I expect to come back to this for enhancement shortly.
If you have requests/feature ideas Add it to the issue tracker on bitbucket.
I'm working on a plugin that filters out a specific file type and relocates them to a different folder.
Everything works as I want except for two issues that I expect are approximately the same solution.
Since uploadFile fires on all files, I need to do an early filter against the extension/mimetype and exit out on a non-match. When I do so, I am firing the callback with (null, data ) where data is the past object for the filter then returning. The resulting link that shows up in the message has a bad URL.
Similarly, when it passes the extension check, it throws an exception due to the uploaded temp file being moved by my plugin.
I assume in both cases this is an issue with what need to get sent back when the filter wraps up its business for the rest of the "upload" flow. Looking at uploads.js hasn't helped me parse it out.
Looking at the imgur plugin has me more confused than understanding.
@Michael-Pfaff I have no clue on how the plugin works, but from the error stack-trace you're trying to use a method .replace on an undefined object, in the file nodebb-plugin-dice-bot/src/dice.js at line 84. Try to see if .replace() is called there, and check with the debugger why the object it's been called on doesn't exist.
Edit: I think it has something to do with the "create post hook", or something like that.
Thanks! This gives me a lead at least. I'll take a look and see if I can figure some shit out.
Hey guys. I recently picked up NodeBB (needed it for a client) and it was (still is) awesome. However, I need help with Plugin development. I could have sat down and dissect the docs (which seems scatterd BTW), but I am super duper busy. . . And I wish to develop the plugin ASAP. So I need a link or anything (blog posts, Youtube videos, books, etc) to get me started. A blog tutorial that outlines the plugin dev process and probably builds a sample plugin would be super helpful....
And BTW, my Nodejs skills is about 6 on a scale of 10, so a dummy approach would be highly appreciated.
I cloned @CCob's OneSignal push notification plugin, which is basically the Pushbullet plugin.
However, whenenver I try to visit the route to enter my user specific settings a 404 error is returned.
If you hit F5 to reload the page it will show up, leading me to the conclusion something is wrong with Ajax/the route itself.