Biskot2 Posted May 16, 2019 Report Posted May 16, 2019 Question: how to download a video from WEB API url. I got a URL(ex: "http:/api/download/y=example.avi") , when I hit event, it should fire that and download the video to my local machine. challenges: 1,.Avi video file. 2, I have found some solution in online, most of them are to download small files like ".png, .excel, .word" but my request is to download big video (~300MB) much appreciated for any proper solution. I tired something like this.. HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK); var fileStream = new FileStream(fullPath, FileMode.Open); response.Content = new StreamContent(fileStream); response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment"); response.Content.Headers.ContentDisposition.FileName = "Test"; return response; but no luck. Jai Balaya Quote
tacobell fan Posted May 16, 2019 Report Posted May 16, 2019 YOU ONLY NEED TO FIND YOURSELF, EVERYTHING ELSE CAN BE googled Quote
Biskot2 Posted May 16, 2019 Author Report Posted May 16, 2019 2 minutes ago, tacobell fan said: YOU ONLY NEED TO FIND YOURSELF, EVERYTHING ELSE CAN BE googled Quote
ekunadam_enkanna Posted May 16, 2019 Report Posted May 16, 2019 The second answer: https://stackoverflow.com/questions/1078523/how-do-i-download-a-large-file-via-http-in-net 1 Quote
Biskot2 Posted May 16, 2019 Author Report Posted May 16, 2019 8 minutes ago, ekunadam_enkanna said: The second answer: https://stackoverflow.com/questions/1078523/how-do-i-download-a-large-file-via-http-in-net thanks bro, chustha Quote
Jombo0108 Posted May 16, 2019 Report Posted May 16, 2019 2 hours ago, tacobell fan said: YOU ONLY NEED TO FIND YOURSELF, EVERYTHING ELSE CAN BE googled Jai balayya Quote
Paidithalli Posted May 16, 2019 Report Posted May 16, 2019 WebClient.DownloadFile eppudu avasaram padaledhu.. good to know Quote
PhillyDotNetGuy Posted May 16, 2019 Report Posted May 16, 2019 check ngflow library. It downloads by chunks. Very good one Quote
Biskot2 Posted May 16, 2019 Author Report Posted May 16, 2019 4 minutes ago, PhillyDotNetGuy said: check ngflow library. It downloads by chunks. Very good one uncle proofs please.. Quote
Paidithalli Posted May 16, 2019 Report Posted May 16, 2019 Nuget lo zch.downloader undhi I guess that will work .. Quote
Paidithalli Posted May 16, 2019 Report Posted May 16, 2019 2 minutes ago, Biskot2 said: uncle proofs please.. try zch.downloader by Zayen Chagra MSBuilder.DownloadFile - downloads a file from a URL to a destination directory or file path Quote
EzMcSquare Posted May 16, 2019 Report Posted May 16, 2019 3 hours ago, Biskot2 said: Question: how to download a video from WEB API url. I got a URL(ex: "http:/api/download/y=example.avi") , when I hit event, it should fire that and download the video to my local machine. challenges: 1,.Avi video file. 2, I have found some solution in online, most of them are to download small files like ".png, .excel, .word" but my request is to download big video (~300MB) much appreciated for any proper solution. I tired something like this.. HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK); var fileStream = new FileStream(fullPath, FileMode.Open); response.Content = new StreamContent(fileStream); response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment"); response.Content.Headers.ContentDisposition.FileName = "Test"; return response; but no luck. Jai Balaya so shameful, jai balaya .. jai bullshit... jai pk....... jai .. jai. xyz.. Quote
Biskot2 Posted May 16, 2019 Author Report Posted May 16, 2019 42 minutes ago, EzMcSquare said: so shameful, jai balaya .. jai bullshit... jai pk....... jai .. jai. xyz.. andhuku man Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.