add upload file and content detection

Add the possibility to create a new post by uploading
a file and autodetect its content-type.

Comments? OK?