J
Jonathan Wood
Greetings,
I've created a download site using ASP.NET. The files are actually hosted on
the authors' sites and not on my server.
When a user downloads a file, I want to make a note of it in the database.
So I can't just have a regular HTML link to the file. I've come up with a
couple of solutions to this using <iframe> and javascript. But one approach
I was hoping to get more info on is returning the file directly from a
postback.
The only way I see to accomplish this is, when the link posts back, my code
would actually retrieve the file from the author's site and feed it to the
current request response, along with the appropriate headers, as though the
file came from my server.
Can anyone tell me:
A) Would this even work?
B) I suppose I'd just download a block of bytes at a time, passing them on
to the request response until the entire file has been sent. Is there a
higher level way to do this?
C) Is there a better way to accomplish this using ASP.NET?
Thanks for any suggestions.
Jonathan
I've created a download site using ASP.NET. The files are actually hosted on
the authors' sites and not on my server.
When a user downloads a file, I want to make a note of it in the database.
So I can't just have a regular HTML link to the file. I've come up with a
couple of solutions to this using <iframe> and javascript. But one approach
I was hoping to get more info on is returning the file directly from a
postback.
The only way I see to accomplish this is, when the link posts back, my code
would actually retrieve the file from the author's site and feed it to the
current request response, along with the appropriate headers, as though the
file came from my server.
Can anyone tell me:
A) Would this even work?
B) I suppose I'd just download a block of bytes at a time, passing them on
to the request response until the entire file has been sent. Is there a
higher level way to do this?
C) Is there a better way to accomplish this using ASP.NET?
Thanks for any suggestions.
Jonathan