G
Guest
Hey Guys
I have a web application that allows users to download files. But the files
are not hosted on the webserver. The files are stored on external servers and
are referenced by a URL/URI. Since my application restricts the number of
downloads for the file per user, i cannot show the user the URL/URI of the
server hosting the file.
Therefore i need to some how route the file via my webserver, and then use
the Response to stream the stream to the client.
I have tried to work with the Webclient class, but the only download method
i could use is readopen(others download the file directly to local drive),
which works BUT since it downloads the whole file into a Byte[] which i then
use the response to stream to the client is not the best of ways since the
Byte[] is in memory and the files being downloaded can be large.
Please Help., someway i can use some sort of unbuffered stream to do the
trick.
I have a web application that allows users to download files. But the files
are not hosted on the webserver. The files are stored on external servers and
are referenced by a URL/URI. Since my application restricts the number of
downloads for the file per user, i cannot show the user the URL/URI of the
server hosting the file.
Therefore i need to some how route the file via my webserver, and then use
the Response to stream the stream to the client.
I have tried to work with the Webclient class, but the only download method
i could use is readopen(others download the file directly to local drive),
which works BUT since it downloads the whole file into a Byte[] which i then
use the response to stream to the client is not the best of ways since the
Byte[] is in memory and the files being downloaded can be large.
Please Help., someway i can use some sort of unbuffered stream to do the
trick.