Ajay, not sure if this will help you or not but....sorry the paste did not work as well as expected. This method goes in the class that derives from RadUploadHandler.
public override bool SaveChunkData(string filePath, long position, byte[] buffer, int contentLength, out int savedBytes)
{
bool result = base.SaveChunkData(filePath, position, buffer, contentLength, out savedBytes);
// Checks if this is the last chunk of each file
if (this.IsFinalFileRequest())
{
//if the file is successfully uploaded
if (result)
{
try
{
//probably a better way to do this instead of reading it back from the file system
FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
BinaryReader rdr = new BinaryReader(fs);
long fileLength = fs.Length;
byte[] docData = rdr.ReadBytes((
int)fs.Length);
rdr.Close();
fs.Close();
string filename = Path.GetFileName(filePath);
string ext = Path.GetExtension(filePath);
//make your call to the database here
}
catch (Exception ex)
//do exection handling
}
}
}
return result;
}