Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Net; // butinas
- namespace uploadImagesC
- {
- class Program
- {
- static void Main(string[] args)
- {
- WebClient client = new WebClient();
- string fileName = @"D:\Downloads\spektras.m";
- ///
- client.Headers.Add("Content-Type","binary/octet-stream");
- byte[] result = client.UploadFile("http://url/upload.php", "POST", fileName);
- String s = System.Text.Encoding.UTF8.GetString(result, 0, result.Length);
- Console.WriteLine(s);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment