0

I have public url of a video file

Im trying to find the file size of that video file.

So that I had created a web request and called GetResponse () and getting the file size from response.ContentLength.

My question is, If the file size is more than 100MB, the GetResponse() method will take much time to complete the request. And will it effect any performance because I just want to find the file size, so no need to download the entire file.

Please help me.

Thanks Naresh Ede

Naresh Ede
  • 123
  • 2
  • 12
  • Please share the exact code. The language you're using in the labels would also be fine. – vahdet Oct 24 '18 at 18:19
  • Hi I'm using c# language. var request=WebRequest.Create(url); WebResponse response =request.GetResponse();. Long xlength=response.ContentLength; – Naresh Ede Oct 24 '18 at 18:52
  • Possible duplicate of [How to get the file size from http headers](https://stackoverflow.com/questions/122853/how-to-get-the-file-size-from-http-headers) – crenshaw-dev Dec 06 '18 at 18:39

0 Answers0