Programatically find out a file type by looking its binary content. Possible?
- by daemonkid
I have a c# component that will recieve a file of the following types
.doc, .pdf, .xls, .rtf
These will be sent by the calling siebel legacy app as a filestream.
So...
[LegacyApp] {Binary file stream} [Component]
The legacy app is a black box that cant be modified to tell the component what file type (doc,pdf,xls) it is sending. The component needs to read this binary stream and create a file on the filesystem with the right extension.
Any ideas?
Thanks for your time.