Lurker News
What are you working on? Any new ideas which you're thinking about?

Comments (1,400) 783 threads

Show all comments

Showing thread 518 of 783

eliseumds1 reply#
I'm dealing with mime types and max file sizes for an uploader, and improving error messages. Instead of relying on the file name to detect the mime type, I'm using the file binary header instead to reject dodgy files (for ex a `sample.jpg` file that is actually a ZIP or EXE under the hood).
andai1 reply#
Are you doing

    head -c 512 file.bin | file -