L
lichaoir
Hmm... What I really mean is...
I want to write a program to monitor file downloading. I want to be
notified when a file has been downloaded, so I can write a record into
database. How should I implement this?
My colleague has written a program, but is has some problem:
-------------------------------------------------------------------------------------------------------------------------------------------
Response.BufferOutput = false;
FileStream fs = File.OpenRead(Server.MapPath("~/test1.zip"));
byte[] data = new byte[fs.Length];
fs.Read(data, 0, data.Length);
Response.OutputStream.Write(data, 0, data.Length);
fs.Close();
fs.Dispose();
// Add a record to database......
I want to write a program to monitor file downloading. I want to be
notified when a file has been downloaded, so I can write a record into
database. How should I implement this?
My colleague has written a program, but is has some problem:
-------------------------------------------------------------------------------------------------------------------------------------------
Response.BufferOutput = false;
FileStream fs = File.OpenRead(Server.MapPath("~/test1.zip"));
byte[] data = new byte[fs.Length];
fs.Read(data, 0, data.Length);
Response.OutputStream.Write(data, 0, data.Length);
fs.Close();
fs.Dispose();
// Add a record to database......