Hi all!!
I'm develloping a web application using asp.net c# that uploads files to a sql server 2008 r2 with filestream and retrieves the sames files stored (the form is used to store and get the files from DataBase).
I'm able to store and view from DB all files (pdf, mov, jpeg, doc, xls) except docx and xlsx. I get errors in ms word (pop-ups) when oppening docx and excel opens xlsx but with unrecognizable characters!!
here is my code for upload file to DB:
protected void Button_FileUpload_Click(object sender, EventArgs e)
{
byte[] buffer = new byte[(int)FileUpload1.FileContent.Length];
FileUpload1.FileContent.Read(buffer, 0, buffer.Length);
if (FileUpload1.FileContent.Length > 0) ...
Go to the complete details ...