c# - Download Video MP4 file from download URL -


i trying download video file (mp4) sitting in cisco webex server c#. url have download url not file location. download url getting browser download video file. tried 'webclient' no luck. mine console application, therefore cannot use 'httpwebrequest' , add mime type iis. below code tried using:

webclient client = new webclient();   client.downloadfile("https://webex.com/lsr.php?rcid=9853e32d921d", @"c:\\video.mp4");   

for now, code starting instance of browser 'process.start("url")' , have changed default download location. know not correct solution therefore request suggestions.

i don't know if you're still looking answer or not looking similar. wanted download video web page client's browser server. did , downloading.

var filename = path.getfilename( filepath ); httpresponsebase.response.clearcontent(); this.response.clearheaders(); this.response.contenttype = type; this.response.appendheader( "content-disposition", "attachment; filename=" + filename ); this.response.binarywrite( system.io.file.readallbytes( filepath ) ); this.response.end(); 

i hope helps!


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -