I believe this is a bug. To replicate:

  1. Write a post (question or answer)
  2. Insert an image and choose to provide it from your computer. Click on the banner to open the file selector and select an image and choose OK (do not drag and drop).
  3. You should see a preview.
  4. Click on Cancel and add another image
  5. Attempt to add the same image, again with with file selector. No preview, no option to add it (button remains disabled)

Tried in IE 11 and Chrome 54.

Attempted with .png and .jpg images

The console in dev tools only shows 1 failure of http://edge.quantserve.com/quant.js

Please note, I keep editing the steps to improve clarity based upon feedback from comments, as such, comments may be out of date

  • Can't reproduce this. Any errors in the console? Do you have any plugins/add-ons that you can disable and try again? Anything on the network tab? – Oded Nov 24 '16 at 12:56
  • I don't believe my IE is running any plug ins... Please note, I updated my post since removing it from SO @Oded :) – Dave Nov 24 '16 at 12:56
  • I saw. Still - no repro here. Can't see this behaviour. Could it be the image? – Oded Nov 24 '16 at 12:57
  • I was able to reproduce only when trying to select the same image file again from my computer. Is this what you mean too, @Dave? – Shadow9 Nov 24 '16 at 12:59
  • @Oded, and tried with .png and .jpg. Tried to re-add the same image (after clicking cancel). – Dave Nov 24 '16 at 12:59
  • Yes @ShadowWizard. If I try to add another image, and then re-attempt the first, it also works. I guess it's trying to prevent uploading the same image twice and going skewy somewhere – Dave Nov 24 '16 at 13:00
  • I was trying drag-n-drop, which just works. – Oded Nov 24 '16 at 13:02
  • Drag-n-drop? Darn kids with your music :) – Dave Nov 24 '16 at 13:03
  • Not prevent, it's a technical matter. The whole thing triggers in a change() event of the browser's file upload control. If you select same file again, no change occurs. That said, when clicking "Cancel", the control can be reset, what you think, @Oded? – Shadow9 Nov 24 '16 at 13:33
  • @ShadowWizard - yeah, that's probably right. – Oded Nov 24 '16 at 13:52
  • Bug to fix in around 1 hour!! – Dave Nov 24 '16 at 14:29

As ShadowWizard guessed in his comment, the file input was not being cleared when the dialog was being reset.

I have now added that bit to the reset code, and the upload works as expected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .