- $sha1Hash = wfBaseConvert( sha1( $params['content'] ), 16, 36, 31 );
- $contentType = $this->getContentType( $params['dst'], $params['content'], null );
+ $sha1Hash = Wikimedia\base_convert( sha1( $params['content'] ), 16, 36, 31 );
+ $contentType = isset( $params['headers']['content-type'] )
+ ? $params['headers']['content-type']
+ : $this->getContentType( $params['dst'], $params['content'], null );