Imgur is a image uploading website who offers an API to upload
My code looks exactly like the PHP code they provide as an example. however, in their php code they ar
Here's an updated version of dtb's answer for the v3 API using anonymous uploading (you need to register your app at http://api.imgur.com/ to get your client ID):
using (var w = new WebClient())
{
string clientID = "<>";
w.Headers.Add("Authorization", "Client-ID " + clientID);
var values = new NameValueCollection
{
{ "image", Convert.ToBase64String(File.ReadAllBytes(@"hello.png")) }
};
byte[] response = w.UploadValues("https://api.imgur.com/3/upload.xml", values);
Console.WriteLine(XDocument.Load(new MemoryStream(response)));
}
And the response is now like this (see http://api.imgur.com/models/image):
SbBGk
1341533193
image/jpeg
false
2559
1439
521916
1
521916
eYZd3NNJHsbreD1
http://i.imgur.com/SbBGk.jpg