Sunday, 15 May 2011

c# - Display a file from a byte[] or stream -


I have found a Winforms app that stores the contents of files in a database. The stored files can be of any type (word, excel, pdf, text, image ...), users can simply select any type of file to load.

The user can then inquire

I have no problem removing the byte array from the database, either as a stream or byte array.

Ideally I'm able to display a file directly from a byte array or stream; Right now I am saving this as a temporary file and then I open it:

  process. Start (filename);  

How can I show files with any byte or application associated with the stream file?

In windows, your only option is to do exactly what you are doing. Outlook, Internet Explorer, Firefox, do all this


No comments:

Post a Comment