http://pastebin.com/7qtAYc7E
http://msdn.microsoft.com/fr-fr/libr...v=vs.110).aspx
http://www.noelshack.com/api.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 
public void uploadImage()
{
            string api = "http://www.noelshack.com/api.php";
            string fileName = "file.jpg";
            WebClient wc = new WebClient();
            byte[] responseArray = wc.UploadFile(api, fileName);
            // Decode and display the response.
            MessageBox.Show(System.Text.Encoding.ASCII.GetString(responseArray), responseArray.Length.ToString(), MessageBoxButtons.OK, MessageBoxIcon.Information);                           
}
J'ai fait casiment exactement le même code.

Bonjour, bon bah voilà mon problème : je veux uploader une imagine sur noelshack. Alors je le fait avec la classe WebClient. L'image est bel et bien uploadée mais le serveur n'envoie pas de réponse ! Le tableau de byte[] est vide ! Vous pourriez m'aider? Merci infiniment.