cannot upload pictures on newly installed nodebb
-
@baris said:
To use imgur for uploads you can install the plugin nodebb-plugin-imgur from the /admin/plugins page, I tested uploading files locally, seems to work for me on the latest.
Can't we upload locally without using any outside resource?
-
@baris said:
Not sure why it's not working for you. What is the browser console saying about that /api/post/upload call.
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (upload, line 0)
-
If I try to attach it using the image icon on console I get the following:
TypeError: Failed to decode param 'uploading%20100%'
at decode_param (/nodebb/node_modules/express/lib/router/layer.js:147:15)
at Layer.match (/nodebb/node_modules/express/lib/router/layer.js:119:11)
at Function.match_layer (/nodebb/node_modules/express/lib/router/index.js:281:16)
at next (/nodebb/node_modules/express/lib/router/index.js:182:10)
at /nodebb/node_modules/express/lib/router/index.js:184:16
at Function.match_layer (/nodebb/node_modules/express/lib/router/index.js:288:3)
at next (/nodebb/node_modules/express/lib/router/index.js:182:10)
at /nodebb/node_modules/express/lib/router/index.js:184:16
at Function.match_layer (/nodebb/node_modules/express/lib/router/index.js:288:3)
at next (/nodebb/node_modules/express/lib/router/index.js:182:10) -
-
I have sent you the file but I have tried with multiple files and sizes and formats and I got the same errors with each and every one of them.
-
-
ok in config.son the config looks like this:
"upload_path": "/public/uploads",
the nodebb installation is on /nodebb and the public folder looks like this:
root@vpsieprod:/nodebb# ls -la public/ total 44 drwxr-xr-x 9 www-data www-data 4096 Aug 9 15:42 . drwxr-xr-x 11 www-data www-data 4096 Aug 9 15:44 .. -rw-r--r-- 1 www-data www-data 1150 Jul 29 15:43 favicon.ico drwxr-xr-x 3 www-data www-data 4096 Jul 29 15:43 images drwxr-xr-x 34 www-data www-data 4096 Jul 29 15:43 language -rw-r--r-- 1 www-data www-data 3151 Jul 29 15:43 logo.png drwxr-xr-x 2 www-data www-data 4096 Aug 9 15:41 sounds drwxr-xr-x 4 www-data www-data 4096 Aug 7 03:21 src drwxr-xr-x 7 www-data www-data 4096 Aug 9 15:42 templates drwxrwxrwx 2 www-data www-data 4096 Aug 7 09:25 uploads drwxr-xr-x 12 www-data www-data 4096 Jul 29 15:43 vendor
-
Running it as root does not change a thing. It is running as root.
-
My other question is that the upload_path from the config file is showing the relative path or absolute path? If it is the absolute path shouldn't be /nodebb/public/uploads? and if it is showing the relative path shouldn't be 'public/uploads'?
-
Yes I still getting that error. I have only a Facebook and twitter sso plugins and a malign plugin installed nothing else.
-
I have found out that I cannot upload because the API should be listening on port 3000 but the port 3000 is used by another node.js application. Is there any way to change the api listen port to something else?
this was in the log of the nginx error log
2014/08/27 13:13:20 [error] 31534#0: *1972 connect() failed (111: Connection refused) while connecting to upstream, client: 79.119.156.210, server: vpsie.247rack.net, request: "POST /api/post/upload HTTP/1.1", upstream: "http://127.0.0.1:3000/api/post/upload", host: "vpsie.247rack.net", referrer: "http://vpsie.247rack.net/forum/topic/1/testing/2"