Re: How to check if uploaded file is binary or ascii?
Posted by Marcin Dobrucki on 08/31/06 09:01
veg_all@yahoo.com wrote:
> Chung Leong wrote:
>
>>Just look for \x00. Binary files would inevitable have it.
>
> Thanks. Is there a way to do it without reading in the entire file to
> memory?
On linux/unix you can call "file" on the uploaded file.