cannot upload pictures on newly installed nodebb

  • NodeBB

    The dimensions of the image shouldn't matter its the filesize thats important. Can you send a copy of the image to [email protected] I will try uploading that.

  • 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.

  • NodeBB

    Yeah I tried uploading the file you sent me on my dev environment and it works fine.


    It has to be something with your setup that's causing the problem. Either the /uploads folder doesn't have the correct permissions or something else is wrong.

  • 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:

    [email protected]:/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
  • NodeBB

    I would suggest installing nodebb as a normal user and running it with that user as well.

  • 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'?

  • @baris

    Can you please paste the part of your config.son related to file upload so that I can compare it with what I have?

  • NodeBB

        "upload_path": "/public/uploads",
        "relative_path": ""

  • @baris I have the same. I have no idea why this is not working even if all is installed and run using root.

  • GNU/Linux Admin

    Are you still getting this error?

    Do you have any custom plugins installed, and if you disable all of them, does image uploading work?

  • 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:, server:, request: "POST /api/post/upload HTTP/1.1", upstream: "", host: "", referrer: ""
  • GNU/Linux Admin

    NodeBB listens to whatever port number you set in the configuration file (config.json). What is port set to there?

  • This is not the node's listen port but it's internal API port which takes the images and places them in the proper place. My node is listening on the default port 4567.

  • GNU/Linux Admin

    Internal API port? NodeBB will always listen on the port set in config.json, and nginx proxies requests elsewhere. I'd look into why port 3000 is being queried, since that's not a port number we use! 😦

  • @julian

    I am running the nodebb on development mode. when I upload a picture, No matter what type I get the following error after the upload count get's to 100% even if I have stopped all other apps.

    Screen Shot 2014-08-27 at 8.35.29 PM.png

    and in the console just this:

          warn: Route requested but not found: /api/post/upload

Suggested Topics

  • 1
  • 2
  • 2
  • 11
  • 2
| |