detect content_type and size of the file