Failed image upload blocks topic creation

AI-generated summary

Failed Image Upload Blocks Topic Creation

A user experienced an issue when trying to upload a large GIF while creating a topic. The upload appeared stuck at 100%, disabling the “Create Topic” button. After replacing the image code with a link, the issue persisted. The user had to switch browsers to successfully submit the topic.

codinghorror suggested a hard refresh (ctrl+f5) as a potential fix. However, Stephen reported that this did not work and inquired about the 0% uploading issue after a previous failure. It appears that the problem is related to the image size, as smaller GIFs can be uploaded without issues.

codinghorror suggested testing the issue on try.discourse.org and tagged zogstrip for assistance. zogstrip provided a commit link to a fix that prevents the server from spending excessive time downsizing and optimizing large images, which may be related to the issue.

Trying to post my previous bug, I tried to upload a large-ish GIF in the post body but after a couple of minutes it was still sat at Uploading 100%, with Create Topic disabled:

I uploaded the image elsewhere and replaced the code in the post body, but was still blocked from creating the topic.

I abandoned creating the post, hit +New Topic to create another, to see this at the bottom:

And Create Topic still grayed out. Had to switch browsers to submit it.

1개의 좋아요

Hard refresh (ctrl+f5) didn’t work? I think it should work.

Is the 0% uploading after previous failure a known issue? Is a hard refresh the only fix?

The failure appears to be due to the size of the image, I can upload smaller GIFs without issue. Is there any way to return an error rather than sit at 100% and then trap the user at 0%?

Possibly a regression if the too large upload just hangs. Can you test on try.discourse.org @zogstrip?

The only thing I could do here was to prevent the server from spending (way too much) time downsizing and optimizing images that were too large to begin with.

https://github.com/discourse/discourse/commit/09bfe49254534cca986ccb28d381fbf4807b8ba8

3개의 좋아요