Cannot upload any image

Technical Support
  • 1,I build my website today, and when I tried to upload logo with admin account, I got the 502 error, here's the information from the console

    Unchecked runtime.lastError: The message port closed before a response was received.
    jquery.js:9837 POST http://xn--uc1a5y.club/api/admin/uploadlogo 502 (Bad Gateway)
    send @ jquery.js:9837
    ajax @ jquery.js:9434
    o @ jquery.form.min.js:7
    e.fn.ajaxSubmit @ jquery.form.min.js:7
    o.ajaxSubmit @ uploader.js:70
    t @ uploader.js:58
    (anonymous) @ uploader.js:34
    dispatch @ jquery.js:5237
    g.handle @ jquery.js:5044
    trigger @ jquery.js:8471
    (anonymous) @ jquery.js:8549
    each @ jquery.js:367
    each @ jquery.js:202
    trigger @ jquery.js:8548
    C.fn.<computed> @ jquery.js:10446
    (anonymous) @ uploader.js:30
    dispatch @ jquery.js:5237
    g.handle @ jquery.js:5044
    socket.io.js:7 GET http://xn--uc1a5y.club/socket.io/?EIO=3&transport=polling&t=M-u4u8u 502 (Bad Gateway)
    

    2,Then I register as a user, and I tried to reply a topic and add a image, I also got the error, here's the information from the console:

    POSThttp://xn--uc1a5y.club/api/post/upload
    [HTTP/1.1 502 Bad Gateway 467ms]
    
    XHRGEThttp://xn--uc1a5y.club/socket.io/?EIO=3&transport=polling&t=M-u7R5U
    [HTTP/1.1 502 Bad Gateway 353ms]
    
    XHRGEThttp://xn--uc1a5y.club/socket.io/?EIO=3&transport=polling&t=M-u7Rq4
    [HTTP/1.1 200 OK 358ms]
    
    GEThttp://xn--uc1a5y.club/socket.io/?EIO=3&transport=websocket&sid=rzrweVDrUFp2T9n4AAAB
    [HTTP/1.1 200 Connection established 333ms]
    
    XHRGEThttp://xn--uc1a5y.club/socket.io/?EIO=3&transport=polling&t=M-u7Rw5&sid=rzrweVDrUFp2T9n4AAAB
    [HTTP/1.1 200 OK 331ms]
    
    XHRPOSThttp://xn--uc1a5y.club/socket.io/?EIO=3&transport=polling&t=M-u7R_y&sid=rzrweVDrUFp2T9n4AAAB
    [HTTP/1.1 200 OK 332ms]
    
    XHRGEThttp://xn--uc1a5y.club/socket.io/?EIO=3&transport=polling&t=M-u7S08&sid=rzrweVDrUFp2T9n4AAAB
    [HTTP/1.1 200 OK 329ms]
    
    GEThttp://xn--uc1a5y.club/assets/uploads/system/favicon.ico?v=1r9n0mjb7dr
    [HTTP/1.1 404 Not Found 368ms]
    
  • still waiting ~

  • @peng-potter
    All other features of NodeBB are working ?

  • Are there any errors in the server log?


Suggested Topics


  • 0 Votes
    1 Posts
    330 Views

    Hi everyone !!

    I am trying to install NodeBB in my local environment to test how everything goes but I am unable to perform the installation.

    I manage to do

    docker run nodebb/docker

    And it says that is live in 4567. However, when I launch localhost:4567 its stuck in a loading white screen.

    I also tried this installation with docker guide, but I am not able to install Redis, and it is the first step:

    When I try any of these commands:

    docker run --name my-forum-redis -d -p 6379:6379 nodebb/docker:centos-redis docker run --name my-forum-redis -d -p 6379:6379 nodebb/docker:ubuntu-redis

    It returns: Error response from daemon: manifest for nodebb/docker:centos-redis not found: manifest unknown: manifest unknown

    Does anybody know how to perform the installation with Docker?
    Thanks in advance.

  • 0 Votes
    1 Posts
    197 Views

    Hi all,

    I'm trying to use the recently introduced WriteAPI to create topics and concurrently upload a file.
    I'm doing it via Python and I've already succeeded in create a simple topic without a file using something lilke

    payload = { "cid": cid, "title": title, "content": message } headers = { 'Authorization': 'Bearer '+nodebbToken, 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=json.dumps(payload))

    but when it's about files using

    payload = { "cid": backstage_cid, "title": backstage_title, "content": backstage_message } headers = { 'Authorization': 'Bearer '+nodebbToken, 'Content-Type': 'multipart/form-data' } verifySSL = False print (payload) if (useFile): with open(backstage_file, 'rb') as f: response = requests.request("POST", url, headers=headers, data=payload, verify=verifySSL, files={backstage_file: f})

    it returns
    Error: Required parameters were missing from this API call: cid, title, content cause passing the parameters in a plain dictionary rather than a JSON object seems not doable.

    The switch from JSON to dictionary is needed otherwise I wouldn't have been able to pass a file together with such header

    headers = { 'Authorization': 'Bearer '+nodebbToken, 'Content-Type': 'multipart/form-data' }

    Has anybody valuable suggestions here?

    Thanks in advance, Riccardo

  • 0 Votes
    1 Posts
    192 Views

    I just try to update the avatar, but it just request timeout error, and shows popup that connections is not ok.

    1.png
    2.png

  • 0 Votes
    8 Posts
    2k Views

    Here you go.
    https://github.com/NodeBB/NodeBB/pull/5828
    After i slept on it, i changed position of hook so it works for both "delay loading" turned on and off. Original place was working only for delay loading turned on so it needed one more hook inside "unloadImages" function and i prefer solutions with less code.

  • 0 Votes
    4 Posts
    1k Views

    @Krissanawat-Kaewsanmuang you misunderstand, that's just a reference of the code which by default falls back to the user image if there's no topic image.