private void btnUpload_Click(object sender, EventArgs e) { //Load the file string filePath = txtFileName.Text; FileStream stream = File.OpenRead(filePath); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); //Upload file Stream reqStream = request.GetRequestStream();//request is declared globally reqStream.Write(buffer, 0, buffer.Length); reqStream.Close(); MessageBox.Show("Uploaded Successfully"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)