Hi,
I am currently developing a Chrome extension to upload photos to TwitPic, but am receiving an error in the response:
<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="fail">
<err code="2" msg="Image type not supported. GIF, JPG, & PNG only" />
</rsp>
My request looks like this:
--345823569845694578678
Content-disposition: form-data; filename="image.png"; name="media"
Content-Type: image/png
Content-Transfer-Encoding: base64
data:image/png;base64,iVBORw0KGgoAAAAN ...
--345823569845694578678
Content-disposition: form-data; name="username"
<twitter_username>
--345823569845694578678
Content-disposition: form-data; name="password"
<twitter_password>
--345823569845694578678
Content-disposition: form-data; name="message"
hello world
--345823569845694578678
The long number in the above is the boundary string. The image data is in base64 ( data:image/png;base64,iVBORw0KGgoAAAAN ... ) and is retrieved from a canvas element.
The image *is* a png, so the fact that I'm getting this error message has me baffled.
Please let me know if you have any ideas of what the problem might be.
Thanks in advance,
George