top | item 6622624

(no title)

njsg | 12 years ago

And you need more because...

Let's be honest, you just need to know how are you going to deal with the file, not what kind of file it is.

You need something along the lines of - this resource is readable text - this resource is binary data - this resource is an image

discuss

order

dragonwriter|12 years ago

> Let's be honest, you just need to know how are you going to deal with the file, not what kind of file it is.

How you are going to deal with it is a function of what kind of file it is, so to know the former you need to know the latter. The internet Media Type system is far from perfect, but much better.

> You need something along the lines of - this resource is readable text - this resource is binary data - this resource is an image

If that was really all you needed, you wouldn't need the subtypes in the internet Media Type system, while experience in the real world has shown that you do need that information.

frezik|12 years ago

Because I want to differentiate between JPEG, GIF, and PNG images? The how is going to be different for each one. Without the protocol telling me, I can only make a reasonable guess on how to process it.