I’ve been trying to use the feature of the imgur API that allows you to just send a GET request to http://api.imgur.com/2/upload with a URL in the form data, and have that image uploaded, but I can’t get it to work, it just returns nothing.
$.get("http://api.imgur.com/2/upload.json", {
url: 'http://upload.wikimedia.org/wikipedia/commons/3/3e/Phalaenopsis_JPEG.png'
}, function(data) {
return console.log(data);
});
Are there any alternatives? Or does anyone know how I can get the above code to work?
Ah, it was in fact working!
The location of the uploaded image was being returned as
Locationin the response headers.Edit:
I found that I wasn’t able to access the headers so I had to come up with something else. Here’s a snippet to upload using YQL: