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

    [HTTP/1.1 502 Bad Gateway 467ms]
    [HTTP/1.1 502 Bad Gateway 353ms]
    [HTTP/1.1 200 OK 358ms]
    [HTTP/1.1 200 Connection established 333ms]
    [HTTP/1.1 200 OK 331ms]
    [HTTP/1.1 200 OK 332ms]
    [HTTP/1.1 200 OK 329ms]
    [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

    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

    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

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


  • 0 Votes
    8 Posts

    Here you go.
    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

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