防盗链
<p class="shortdesc"></p>
<section class="section" id="ref__section_c2h_4tb_rlb"><h2 class="doc-tairway">设置防盗链</h2>
<table class="table" id="ref__table_irk_vvl_plb"><caption></caption><colgroup><col style="width:164pt"><col style="width:399.5pt"><col style="width:164pt"></colgroup><thead class="thead">
<tr class="row">
<th class="entry" id="ref__table_irk_vvl_plb__entry__1">PUT</th>
<th class="entry" id="ref__table_irk_vvl_plb__entry__2"> http://{host:port}
/{bucket}/{key:.*}/imageView/{mode}/w/{width}/h/{height}/format/{format} </th>
<th class="entry" id="ref__table_irk_vvl_plb__entry__3">说明</th>
</tr>
</thead><tbody class="tbody">
<tr class="row">
<td class="entry" headers="ref__table_irk_vvl_plb__entry__1 " rowspan="3">
<p class="p">入参</p>
</td>
<td class="entry" headers="ref__table_irk_vvl_plb__entry__2 ">
<p class="p"> allowEmptyReferer </p>
</td>
<td class="entry" headers="ref__table_irk_vvl_plb__entry__3 ">
<p class="p">allowEmptyReferer:指定是否允许referer字段为空的请求访问。 类型:枚举字符串有效值:true或false
默认值:true</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_irk_vvl_plb__entry__2 ">
<p class="p">bucketName </p>
</td>
<td class="entry" headers="ref__table_irk_vvl_plb__entry__3 ">
<p class="p">Bucket名字</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_irk_vvl_plb__entry__2 ">
<p class="p">refererList </p>
</td>
<td class="entry" headers="ref__table_irk_vvl_plb__entry__3 ">
<p class="p">字符串list,内容是白名单信息,多个用字符串分隔, 格式:referer1,referer2,referer3</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_irk_vvl_plb__entry__1 " rowspan="2">
<p class="p">出参</p>
</td>
<td class="entry" headers="ref__table_irk_vvl_plb__entry__2 ">
<p class="p">成功</p>
</td>
<td class="entry" headers="ref__table_irk_vvl_plb__entry__3 ">
<p class="p"> { "status": "SUCCESS", "message": "success", "responseData": {
"bucketName": "bucketName1", "allowEmptyReferer": true,
"refererList": [ "referer1", "referer2" ] } }</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_irk_vvl_plb__entry__2 ">
<p class="p">失败</p>
</td>
<td class="entry" headers="ref__table_irk_vvl_plb__entry__3 ">
<p class="p"> { "status": "FAILED", "message": "错误信息", "responseData": null
}</p>
</td>
</tr>
</tbody></table>
</section>
<section class="section" id="ref__section_e1t_ptb_rlb"><h2 class="doc-tairway"> 获取防盗链</h2>
<table class="table" id="ref__table_jrk_vvl_plb"><caption></caption><colgroup><col><col><col></colgroup><thead class="thead">
<tr class="row">
<th class="entry" id="ref__table_jrk_vvl_plb__entry__1">GET</th>
<th class="entry" id="ref__table_jrk_vvl_plb__entry__2"> http://{host:port}/aoss-api/GetBucketReferer </th>
<th class="entry" id="ref__table_jrk_vvl_plb__entry__3">说明</th>
</tr>
</thead><tbody class="tbody">
<tr class="row">
<td class="entry" headers="ref__table_jrk_vvl_plb__entry__1 ">
<p class="p">入参</p>
</td>
<td class="entry" headers="ref__table_jrk_vvl_plb__entry__2 ">
<p class="p">bucketName</p>
</td>
<td class="entry" headers="ref__table_jrk_vvl_plb__entry__3 ">
<p class="p">Bucket名字</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_jrk_vvl_plb__entry__1 " rowspan="2">
<p class="p">出参</p>
</td>
<td class="entry" headers="ref__table_jrk_vvl_plb__entry__2 ">
<p class="p">成功</p>
</td>
<td class="entry" headers="ref__table_jrk_vvl_plb__entry__3 ">
<p class="p">① 已设置防盗链: { "status": "SUCCESS", "message": "success",
"responseData": { "bucketName": "bucketName1",
"allowEmptyReferer": true, "refererList": [ "referer1",
"referer2" ] } }② 未设置防盗链: { "status": "SUCCESS", "message":
"Referer not set", "responseData": null }</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_jrk_vvl_plb__entry__2 ">
<p class="p">失败</p>
</td>
<td class="entry" headers="ref__table_jrk_vvl_plb__entry__3 ">
<p class="p">{ "status": "FAILED", "message": "错误信息", "responseData": null
}</p>
</td>
</tr>
</tbody></table>
</section>
<section class="section" id="ref__section_pqw_ptb_rlb"><h2 class="doc-tairway">下载文件(响应文件流以gzip方式压缩)</h2>
<table class="table" id="ref__table_krk_vvl_plb"><caption></caption><colgroup><col><col><col></colgroup><thead class="thead">
<tr class="row">
<th class="entry" id="ref__table_krk_vvl_plb__entry__1">GET</th>
<th class="entry" id="ref__table_krk_vvl_plb__entry__2">http://{host:port}/{bucket}/{key}/gzip </th>
<th class="entry" id="ref__table_krk_vvl_plb__entry__3">说明</th>
</tr>
</thead><tbody class="tbody">
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__1 " rowspan="3">
<p class="p">头参</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">Authorization</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">签名串(非必填)</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">Content-Type</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">application/x-www-form-urlencoded(非必填)</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">Date</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">请求发起的GMT时间,如Fri, 14 Jul 2017 09:06:22 GMT(非必填)</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__1 " rowspan="4">
<p class="p">入参</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">AWSAccessKeyId</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">租户AK(非必填)</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">Expires </p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">从1990-01-01 00:00:00 GMT到截止有效期的秒数(非必填)</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">Signature </p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">签名串(非必填)</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p"> response-content-disposition</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">下载文件重命名(非必填)</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__1 " rowspan="2">
<p class="p">路径参数</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">{bucket}</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">Bucket名字,格式:小写字母、 数字、中划线(不支持中文),不能以中横线开头或结尾,不能以-s数字结尾
命名规范:RSMS子系统英文简称-环境-自定义/流水码,环境:用dev代表开发测试环境,prd代表生产环境和灾备环境</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">{key}</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">对象key</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__1 " rowspan="2">
<p class="p">出参</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">成功</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">对象流(以gzip方式压缩)</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="ref__table_krk_vvl_plb__entry__2 ">
<p class="p">失败</p>
</td>
<td class="entry" headers="ref__table_krk_vvl_plb__entry__3 ">
<p class="p">异常信息</p>
</td>
</tr>
</tbody></table>
<div class="note important note_important"><span class="note__title">重要:</span>
<ul class="ul" id="ref__ul_u5h_2xl_plb">
<li class="li">
<p class="p">当bucket的访问被设置成public-read, public-read-write时:</p>
<p class="p">不需要填入认证信息,即AWSAccessKeyId,Expires,Signature,Authorization,Date都不用填写;</p>
</li>
<li class="li">
<p class="p">当bucket的访问被设置成private时:</p>
<p class="p">当通过签名URL下载文件时,入参中的AWSAccessKeyId,Expires,Signature为必填;</p>
<p class="p">否则,头参Authorization,Content-Type,Date为必填,且不要填写入参AWSAccessKeyId。</p>
</li>
</ul>
</div>
</section>
提交成功!非常感谢您的反馈,我们会继续努力做到更好!