Hi dudes!
I just recieve my unique developer API key from Imgur and I'm aching to start cracking on this baby.
First a simple test to kick things off. How can I upload an image using C#? I found this using Python:
#!/usr/bin/python
import pycurl
c = pycurl.Curl()
values = [
("key", "YOUR_API_KEY"),
("image", (c.F...
The documentation of the API shows source code on how to accomplish this in Python:
#!/usr/bin/python
import pycurl
c = pycurl.Curl()
values = [
("key", "YOUR_API_KEY"),
("image", (c.FORM_FILE, "file.png"))]
# OR: ("image", "http://example.com/example.jpg"))]
c.setopt(c.URL, "http://imgur.com/api/upload.xml")
...
Hi,
I'm trying to send an image to Imgur's server.
Everything went fine and I'm getting the URL of the image from the parser but when I'm trying to open it on the web browser, I'm not getting the image... only a "broken image" icon.
I think it's a problem in the convertion to the byte array.... but I don't get it. please let me know/fi...
Here's my jQuery:
var docname = $('#doc').val();
function parseXml(xml)
{
$(xml).find("rsp").each(function()
{
alert("success");
});
}
$('#submit').click(function() {
$.ajax({
type: "GET",
url: "img_upload.php",
data: "doc=" + docname,
dataType: "xml",
success: parseXml
});
return false;
});
Not...
I have an image uploader that uses the imgur.com API and jQuery's .ajax() function to upload images to their servers. However, if I browse for an image using the <input type="file"/> element of the form, it will only be successful in uploading an image if the image file is found in the same directory as the page.php file that the form is...
I have the following code:
private void UploadSelectedImages(ListBox.ObjectCollection objectCollection)
{
foreach (var photo in objectCollection)
{
using (var w = new WebClient())
{
var values = new NameValueCollection
{
{ "key", "<MYAPIHERE>" },
{ "image", ...