Can't upload profile pics on Windows server install
-
That error seems to be coming from the gm module, at
https://github.com/NodeBB/NodeBB/blob/master/src/image.js#L18 and
https://github.com/NodeBB/NodeBB/blob/master/src/image.js#L23, not sure how compatible they are on windows, you can try commenting out those resize lines and see if uploads work. -
I RDP in as Administrator (not very secure, I know, we're going to disable it before going live), so the command prompt runs as admin every time. I tried changing the permissions of the folder it says in the error, but that didn't change anything. I even ran a fresh install of NodeBB, but that had no effect either. At this point what we're gonna do is just run it on a small Linux box.
-
I can't blame you; Windows can be pretty finicky sometimes. If you have UAC enabled, I think you might still have to specify that you want to run your command prompt in Administrator mode. I'd double check that just to make sure.
I found someone who was having somewhat similar problems with node's GraphicsMagick (gm) plugin on StackOverflow and it looks like their solution involved changing
require('gm').subClass({imageMagick:true})
torequire('gm')
, as well as running node from Administrator mode. -
Looks like a permissions error, but their solution is to use
require('gm').subClass({ imageMagick : true})
.Maybe Linux is the answer for you after all!
-
I've managed to reproduce the issue on Win2k8R2. It's coming from ImageMagick not being installed/configured correctly.
These are the steps I took to fix the issue:
-
Go out and install the latest version of ImageMagick
-
After running the installer make sure that you close the command prompt from which you are running NodeBB.
-
Open a new command prompt and rerun
node app.js
The problem should be fixed!
-