Any file upload does not work

Technical Support
  • Hi
    Freshly installed NodeBB 1.13.3 on Ubuntu 18.04.
    All works fine but uploading any file (category, logo, etc) gives the following error in the UI:

    In the log the error is as following:
    Error: [[error:invalid-files]]
    at validateFiles (/home/<user>/nodebb/src/middleware/index.js:107:15)
    at Layer.handle [as handle_request] (/home/<user>/nodebb/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/<user>/nodebb/node_modules/express/lib/router/route.js:137:13)
    at Form.<anonymous> (/home/<user>/nodebb/node_modules/connect-multiparty/index.js:114:7)
    at Form.emit (events.js:315:20)
    at emitCloseNT (internal/streams/destroy.js:81:10)
    at processTicksAndRejections (internal/process/task_queues.js:83:21)


  • Make sure you are not using nodejs 14.x

  • nodejs --version

    Ok, what shall I do now - downgrade nodejs?

  • ok, I just did a downgrade - now all works fine !!

    nodejs --version

Suggested Topics

  • 0 Votes
    1 Posts

    I noticed that custom pages no longer work. I see the following records in the error logs. I uninstalled and reinstalled the nodebb-custom-pages plugin. I've done several reboots and builds but it didn't work. Why might the problem be caused?
    my NodeBB version: 2.2.5
    custom pages version: 1.3.3

    2022-07-25T11:06:33.959Z [4567/1887] - error: GET /iletisim Error: Failed to lookup view "iletisim" in views directory "/home/nodes/nodebb/build/public/templates" at Function.render (/home/nodes/nodebb/node_modules/express/lib/application.js:597:17) at ServerResponse.render (/home/nodes/nodebb/node_modules/express/lib/response.js:1039:7) at /home/nodes/nodebb/src/middleware/render.js:107:11 at new Promise (<anonymous>) at renderContent (/home/nodes/nodebb/src/middleware/render.js:106:10) at renderMethod (/home/nodes/nodebb/src/middleware/render.js:75:15) at async ServerResponse.renderOverride [as render] (/home/nodes/nodebb/src/middleware/render.js:96:5)
  • 0 Votes
    3 Posts

    thank you man but specify in the documentation that the keys can become obsolete for such as I xD although I took the key from here . I have some problems but more about this later

  • 0 Votes
    4 Posts

    That is a warning. That should not be causing issues for when you visit your site. Check for other errors in the nodebb log and in your browser console.

  • 0 Votes
    2 Posts

    It was solved; here is my working Apache's nodebb.conf:

    <VirtualHost *:80> ServerName Redirect permanent / </VirtualHost> <VirtualHost *:443> ServerName SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM SSLCertificateFile /etc/apache2/ssl/thewizards-club/ SSLCertificateKeyFile /etc/apache2/ssl/server.key.insecure SSLCertificateChainFile /etc/apache2/ssl/thewizards-club/1_root_bundle.crt # ServerAdmin webmaster@localhost <Proxy *> Require all granted </Proxy> ProxyRequests off #ProxyVia on AllowEncodedSlashes On #ProxyPreserveHost on RequestHeader set X-Forwarded-Proto "https" RewriteEngine On RewriteCond %{REQUEST_URI} ^/ [NC] RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteRule /(.*) ws://$1 [P,NE,L] # NE flag == noescape ProxyPass / nocanon retry=0 ProxyPassReverse / ProxyPass / nocanon retry=0 ProxyPassReverse / ErrorLog /home/web/logs/apache/forum-error.log CustomLog /home/web/logs/apache/forum-access.log combined </VirtualHost>

    It was fixed it based on these resources:

    Apache ProxyPassReverse escaping special characters

    I have this very simple reverse proxy rule in Apache 2.2.19: ProxyPass /test http://other.local.machine/test ProxyPassReverse /test http://other.local.machine/test The problem is...


    Server Fault (

    can't get mod_proxy to correctly forward encoded slash (/) characters (%2f)

    I have a virtual host set up to redirect ntung-gitblit.localhost --> myserver:1279. However, it's not working with forward encoded slashes (%2f). The URL I'm trying to access is, http://ntung-gitb...


    Server Fault (

  • 0 Votes
    1 Posts

    Hey! Im currently using imgur plugin for image uploads.

    Is there any way to set it up so that only admins are able to upload images? (The solution doesn't necessarily need to be using imgur plugin)