10

It would seem it is not currently possible to upload a PNG image from my local file system:

screenshot

This happens when I try to upload any PNG. I just had to first upload to ImageShack and then upload to Stack Overflow via the "From the web" option.

Despite the fact that I am using IE8, I don't believe this to be browser-related, because I can upload GIFs and JPEGs with no problem.

The headers being sent by the browser:

POST http://meta.stackoverflow.com/upload/image HTTP/1.1
Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Referer: http://meta.stackexchange.com/questions/184641/unable-to-upload-a-png-to-include-in-a-post-from-local-computer
Accept-Language: ru-RU
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MAPB; .NET4.0C; .NET4.0E; .NET CLR 1.1.4322)
Content-Type: multipart/form-data; boundary=---------------------------7dd2b2931053c
Accept-Encoding: gzip, deflate
Host: meta.stackoverflow.com
Content-Length: 37481
Connection: Keep-Alive
Pragma: no-cache
Cookie: wonttellya

-----------------------------7dd2b2931053c
Content-Disposition: form-data; name="fkey"

f2fbecdc7ac0c6592e7aa80bcf54f345
-----------------------------7dd2b2931053c
Content-Disposition: form-data; name="source"

computer
-----------------------------7dd2b2931053c
Content-Disposition: form-data; name="filename"; filename="S6lQ7.png"
Content-Type: image/x-png
  • Do you happen to know what mime-type is being used? – Oded Jun 16 '13 at 19:02
  • @Oded Nope, how do I find out? – GSerg Jun 16 '13 at 19:03
  • Either using the developer tools and looking at the headers for the post request or using fiddler as a proxy to see what headers are being sent with the image. – Oded Jun 16 '13 at 19:04
  • @Oded Content-Type: image/x-png. – GSerg Jun 16 '13 at 19:24
  • Try it not using IE8 and remove all doubt. – Ry- Jun 16 '13 at 22:56
10

In our image upload backend, we are checking for known mime-types to ensure that the content being uploaded is indeed an image.

image/x-png was not on the list.

It will be in the next build.

  • The revision number just changed from 2013.6.17.17 to 2013.6.17.18, but the problem appears to be not fixed? – GSerg Jun 17 '13 at 20:46
  • @GSerg - Meta is special right now (running a different version from the rest of the network) - how about other sites? – Oded Jun 18 '13 at 8:48
  • Yes, works there. – GSerg Jun 18 '13 at 11:41
  • @GSerg - Just deployed to Meta, so once you see the version change, you can test here as well. – Oded Jun 18 '13 at 11:48
  • Works here, too. – GSerg Jun 18 '13 at 12:01

You must log in to answer this question.

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