Closed zzwooc closed 6 years ago
@sundaywill
https://help.aliyun.com/document_detail/44460.html?spm=a2c4g.11186623.2.46.q9GwMm
在这个文档里 FileURLs 是必须参数的。你应该是少了这个吧。
在我写的SDK里 https://github.com/AxiosCros/aliyun-sdk/blob/master/library/mts/Mts.php 514行 $file_urls 是必须要传的参数。
$result = \aliyun\sdk\mts\Mts::QueryMediaListByURL('file_urls');
dump($result->request()->getContent());
@AxiosCros 这个参数我是写了的
$request->setFileURLs($ossDomain . $ossObject);
请求参数如下
{
"IncludeMediaInfo" => "true"
"IncludePlayList" => "true"
"IncludeSnapshotList" => "true"
"FileURLs" => "https://skybc-dev.oss-us-west-1.aliyuncs.com/videos/Ozsq5WOrmpSNHlLw"
"RegionId" => "us-west-1"
"AccessKeyId" => "LTAIA4ofVWhl3DGY"
"Format" => "JSON"
"SignatureMethod" => "HMAC-SHA1"
"SignatureVersion" => "1.0"
"SignatureNonce" => "5996a0136f3195339d5c14520cd466e7"
"Timestamp" => "2018-08-06T11:57:10Z"
"Action" => "QueryMediaListByURL"
"Version" => "2014-06-18"
"Signature" => "nvph5UnqCPsnn/dMHWTwA+3cbbQ="
}
找到问题了,file url,不能是 https
媒体处理》查询媒体-使用OSS文件地址,这个接口(https://www.alibabacloud.com/help/zh/doc-detail/56797.htm)一直报错:InvalidParameter.InvalidHTTPProtocol The parameter \"InputFileUrl\" is not a valid url,protocol not supported HTTP Status: 400 然而文档里根本就没有 InputFileUrl这个参数,求助