Filestream attribute supported formats
When saving f开发者_C百科iles to SQL Server 2008 using the FILESTREAM attribute, I have an issue where certain files are not saved.
For instance a .docx document will not save, but the same file saved in '97 .doc format gets saved.
I have been unable to find any details on the supported filetypes. Any suggestions would be most welcome.
Code I am using to save files. I am using Entity Framework via OData, I have a feeling that this is not supported.
Files newFile = new Files();
newFile.FileID = Guid.NewGuid();
newFile.FileContents = System.IO.File.ReadAllBytes("TextFile1.txt");
ctx.AddObject("Files", newFile);
ctx.SaveChanges();
All file formats are supported. The problem is your save code, it does not properly handle all types correctly.
加载中,请稍侯......
精彩评论