Sorry if this is real newbie stuff, hopefully you can provide me with directions on were to go from here.
I've created a directory browsing code which works without any problem.
The problem is that when a user (or me, still in development) tries to download a file it opens the file in the browser, instead of having the Save As prompt.
So I want to force the Save As prompt.
So I searched the net and found that this was possible, I found a good example using the Response.BinaryWrite method. The problems with BinaryWrite is that it doesn't handle big files very well (AFAIK).
I read on msdn that the default buffer size is 4MB.
I guess this i right because I get "virtual memory" errors on the server if I try to download a 50MB file.
So is this fixable ?
Here is the example code from www.aspfaq.com
fn = "ml1.jpg"
FPath = "c:\" & fn
Response.ContentType = "application/asp-unknown" ' arbitrary
achment; filename=" & fn
Set adoStream = Server.CreateObject("ADODB
adoStream.Type = 1
adoStream.Close: Set adoStream = Nothing
I've modified the code so that it's checking the path and file name that get send from the link.
Otherwise it's the same code.