Detect content-type from Buffer data.