Document not in given format

  • Thread starter Thread starter hari66
  • Start date Start date
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...
 

Similar threads

S
Replies
0
Views
124
Sampath Gamaarchchi
S
J
Replies
0
Views
133
Joseph261
J
P
Replies
0
Views
95
Paulywog0667_Laptop
P
Back
Top