What fields do you think I need to store/retrieve files generically?

I am thinking:

* name (varchar)
* data (blob)
* content\_type (varchar)

Also, is there a way in php to programmatically determine content-type when file is uploaded?

(I have already asked the question files in file system or database and I have chosen to go with database.)