开发者

Filestream attribute supported formats

开发者 https://www.devze.com 2023-02-22 11:55 出处:网络
When saving f开发者_C百科iles to SQL Server 2008 using the FILESTREAM attribute, I have an issue where certain files are not saved.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消