I’m using Direct Creator Upload urls. Users attach an image to a message board post using these urls and when done I update the UI with a thumbnail variant. The problem is I get this message when accessing the images after upload:
ERROR 9404: Could not fetch the image — the server returned HTTP error 404 Not Found
Now my app adds this img to the interface immediately after upload, so I though maybe I need to add a short pause. But the thing is it takes almost a full minute of refreshing the same url before it starts to show up. Here’s an example:
Am I doing something wrong, or is there some sort of temporary slowdown happening right now?
This turned out to be my fault (go figure). I was monitoring progress of the image upload to cloudflare and attempting to display the image once my upload was “completed”. Erroneously though I wasn’t waiting for the full POST request to complete though, rather just waiting for axios’ progress upload event handler to read 100%.
I believe what happened is I would request the image before the POST fully completed, and cloudflare images would correctly return a 404 as the image hadn’t been fully uploaded. This 404 response appeared to be cached, which would result in the image appearing broken for some time.
Fully my fault but it may be worth keeping this post up in case anyone has a similar issue.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.