Anees
Anees

Reputation: 873

Bytes Upload to the server:

In my application I use below code to upload a file to the server.

 response = (HttpWebResponse)request.GetResponse();

where request.Method is "PUT".

Is there a way to get the number of bytes uploaded to the server.

Thanks in advance

Upvotes: 0

Views: 122

Answers (2)

Ilya Khaprov
Ilya Khaprov

Reputation: 2524

Is HttpWebResponse.ContentLength suitable?

Upvotes: 1

anishMarokey
anishMarokey

Reputation: 11397

why you can't try with WebClient

E.g:

 WebClient wc = new WebClient();
 byte[] s = wc.UploadFile("string address", "string fileName");

Upvotes: 0

Related Questions