Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
Advertisement
Add Comment
Please, Sign In to add comment