tags:

views:

82

answers:

2

Hi,

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

A: 

why you can't try with WebClient

E.g:

 WebClient wc = new WebClient();
 byte[] s = wc.UploadFile("string address", "string fileName");
anishmarokey
need to have more flexibility with webRequest and webResponse objects instead of WebClient.
Andy
+1  A: 

Is HttpWebResponse.ContentLength suitable?

Trickster