Re: How to check if uploaded file is binary or ascii?



veg_all@xxxxxxxxx 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.
.