cannot upload pictures on newly installed nodebb
-
-
-
Yes I can upload a picture to imgur. Should I have some plugin installed for that?
-
@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'?