Binary Check
1 posts in topic
Flat View  Flat View

Posted By:   Ritu_Srivastav
Posted On:   Monday, May 7, 2001 12:22 PM

I have a code where user uploads files from the file system into the application. I wanted to restrict the users from uploading binary files. I do'nt want to check for file extensions instead use some other way of finding out from header if the file is binary or not? Does anybody know how to do this?


Re: Binary Check

Posted By:   Anonymous  
Posted On:   Tuesday, May 8, 2001 02:10 AM

You could check the first 1024 bytes of containing binary characters. This is not a safe method, but should work for most files.
About | Sitemap | Contact