H
hari66
Guest
tokens = fluDocument.PostedFile.FileName.Split(new string[] { "." }, StringSplitOptions.None);
extention = tokens[1];
FileStream fs = new FileStream(filePath + fluDocument.PostedFile.FileName, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
Byte[] bytes = br.ReadBytes((Int32)fs.Length);
br.Close();
fs.Close();
doc.DocumentContent = bytes;
#region "Checking extention"
if (extention == "pdf")
{
doc.ContentType = "application/" + extention;
}
The document posted in fludocument and saved in side fileUploads folder cannot be retrieved and saved inside the sql server database
Continue reading...
extention = tokens[1];
FileStream fs = new FileStream(filePath + fluDocument.PostedFile.FileName, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
Byte[] bytes = br.ReadBytes((Int32)fs.Length);
br.Close();
fs.Close();
doc.DocumentContent = bytes;
#region "Checking extention"
if (extention == "pdf")
{
doc.ContentType = "application/" + extention;
}
The document posted in fludocument and saved in side fileUploads folder cannot be retrieved and saved inside the sql server database
Continue reading...