public function upload(string $type, string $path)
    {
        $files = [
            'media' => $path,
        ];

        return $this->httpUpload('cgi-bin/media/upload', $files, [], compact('type'));
    }
public function upload(string $type, string $path)
    {
        $files = [
            'media' => $path,
        ];

        return $this->httpUpload('cgi-bin/media/upload', $files, [], compact('type'));
    }
public function upload ( string $ type , string $ path ) { $ files = [ 'media' => $ path , ] ; return $ this -> httpUpload ( 'cgi-bin/media/upload' , $ files , [ ] , compact ( 'type' ) ) ; }
Upload media.

@param string $type
@param string $path

@return mixed
Upload media .