iOS SDK

<p class="shortdesc"></p> <section class="section" id="iOS_SDK___section_p4z_s5m_qlb"><h2 class="doc-tairway">1. 简介</h2> <ul class="ul" id="iOS_SDK___ul_glr_kzm_qlb"> <li class="li">本文档主要介绍 OBS iOS SDK 的接口使用及注意事项;</li> <li class="li">并且假设您是平安云用户,且已经开通了OBS服务;</li> <li class="li">如果您还没有开通或者还不了解平安云 OBS 服务,请登录<a class="xref" href="/ssr/products/OBS" target="_blank">OBS产品主页</a>进行了解。</li> <li class="li">OBS-iOS-SDK 是由平安云团队开发的工具包。便于开发者在 iOS 上方便使用平安云当中的 OBS 服务。</li> </ul> <p class="p">文档主要罗列了 OBS-iOS-SDK 中,上传、下载以及删除的一些基本方法,并对方法参数进行简要解释,且对响应方法有一个详细的说明。</p> </section> <section class="section" id="iOS_SDK___section_dwc_t5m_qlb"><h2 class="doc-tairway">2. SDK下载</h2> <p class="p">IOS SDK 开发包最新版本 <a class="xref" href="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/sdk%2Fobs-iOS-sdk-1.0.3.zip?response-content-disposition=attachment%3Bfilename%3Dobs-iOS-sdk-1.0.3.zip" target="_blank">v1.0.3</a></p> <p class="p">IOS Demo <a class="xref" href="http://iobs.pingan.com.cn/download/iobs-dmz-dev-aid/ObsTest_demo?attname=" target="_blank">下载</a></p> <p class="p">签名服务Demo <a class="xref" href="http://iobs.pingan.com.cn/download/iobs-dmz-dev-aid/sign-demo?attname=" target="_blank">JAVA版下载</a></p> </section> <section class="section" id="iOS_SDK___section_lvd_t5m_qlb"><h2 class="doc-tairway">3. API概览</h2> <table class="table" id="iOS_SDK___table_d4q_4zm_qlb"><caption></caption><colgroup><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_d4q_4zm_qlb__entry__1"><p class="p">API</p></th> <th class="entry" id="iOS_SDK___table_d4q_4zm_qlb__entry__2"><p class="p">描述</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__1 "><p class="p">initWithTokenGeter</p></td> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__2 "><p class="p">初始化服务</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__1 "><p class="p">initWithBackupHosts</p></td> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__2 "><p class="p">使用备用域名生成上传实例</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__1 "><p class="p">putFileWithData</p></td> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__2 "><p class="p">上传 data 文件</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__1 "><p class="p">putFileWithPath</p></td> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__2 "><p class="p">根据路径上传文件</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__1 "><p class="p">uploadImage</p></td> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__2 "><p class="p">上传图片并压缩</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__1 "><p class="p">sliceUploadFileWithPath</p></td> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__2 "><p class="p">分片上传文件</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__1 "><p class="p">downloadWithBucket</p></td> <td class="entry" headers="iOS_SDK___table_d4q_4zm_qlb__entry__2 "><p class="p">下载文件</p></td> </tr> </tbody></table> </section> <section class="section" id="iOS_SDK___section_jh2_t5m_qlb"><h2 class="doc-tairway">4. API描述</h2> <p class="p"><strong class="ph b">(1) initWithTokenGeter</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">基础初始化方法</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="iOS_SDK___table_fxk_qzm_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_fxk_qzm_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="iOS_SDK___table_fxk_qzm_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="iOS_SDK___table_fxk_qzm_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="iOS_SDK___table_fxk_qzm_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="iOS_SDK___table_fxk_qzm_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_fxk_qzm_qlb__entry__1 "><p class="p">tokenGeter</p></td> <td class="entry" headers="iOS_SDK___table_fxk_qzm_qlb__entry__2 "><p class="p">IOBSTokenGeter</p></td> <td class="entry" headers="iOS_SDK___table_fxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_fxk_qzm_qlb__entry__4 "><p class="p">获取token回调</p></td> <td class="entry" headers="iOS_SDK___table_fxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="iOS_SDK___table_gxk_qzm_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_gxk_qzm_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="iOS_SDK___table_gxk_qzm_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="iOS_SDK___table_gxk_qzm_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="iOS_SDK___table_gxk_qzm_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_gxk_qzm_qlb__entry__1 "><p class="p">instancetype</p></td> <td class="entry" headers="iOS_SDK___table_gxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadToken</p></td> <td class="entry" headers="iOS_SDK___table_gxk_qzm_qlb__entry__3 "><p class="p">上传管理类实例</p></td> <td class="entry" headers="iOS_SDK___table_gxk_qzm_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(2) initWithBackupHosts</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p"><strong class="ph b"> 使用备用域名生成上传实例</strong></p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="iOS_SDK___table_hxk_qzm_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_hxk_qzm_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="iOS_SDK___table_hxk_qzm_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="iOS_SDK___table_hxk_qzm_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="iOS_SDK___table_hxk_qzm_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="iOS_SDK___table_hxk_qzm_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__1 "><p class="p">hosts</p></td> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__2 "><p class="p">NSArray *</p></td> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__4 "><p class="p">备用域名池</p></td> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__1 "><p class="p">tokenGeter</p></td> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__2 "><p class="p">IOBSTokenGeter</p></td> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__4 "><p class="p">获取token回调</p></td> <td class="entry" headers="iOS_SDK___table_hxk_qzm_qlb__entry__5 "> <p class="p">-</p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <table class="table" id="iOS_SDK___table_ixk_qzm_qlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_ixk_qzm_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="iOS_SDK___table_ixk_qzm_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="iOS_SDK___table_ixk_qzm_qlb__entry__3"><p class="p">参数描述</p></th> <th class="entry" id="iOS_SDK___table_ixk_qzm_qlb__entry__4"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_ixk_qzm_qlb__entry__1 "><p class="p">instancetype</p></td> <td class="entry" headers="iOS_SDK___table_ixk_qzm_qlb__entry__2 "><p class="p">IOBSUploadToken</p></td> <td class="entry" headers="iOS_SDK___table_ixk_qzm_qlb__entry__3 "><p class="p">上传管理类实例</p></td> <td class="entry" headers="iOS_SDK___table_ixk_qzm_qlb__entry__4 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">(3) putFileWithData</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">传 data 文件</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="iOS_SDK___table_jxk_qzm_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_jxk_qzm_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="iOS_SDK___table_jxk_qzm_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="iOS_SDK___table_jxk_qzm_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="iOS_SDK___table_jxk_qzm_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="iOS_SDK___table_jxk_qzm_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__1 "><p class="p">fileData </p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__2 "><p class="p">NSData *</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__4 "><p class="p">获取token回调</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__4 "><p class="p">上传到指定 bucket 名称</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__1 "><p class="p">key</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__3 "><p class="p">True</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__4 "><p class="p">上传对应 bucket 里文件的 key</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__1 "><p class="p">option </p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadOption *</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__4 "><p class="p">上传时传入的可选参数实现上传文件时候的进度查看</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__1 "><p class="p">baseUrl</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__4 "> <p class="p">基础域名 e.g </p> <p class="p">@”obs-cn-shenzhen.yun.pingan.com”</p> </td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__1 "> <p class="p">Complete</p> <p class="p">Handler</p> </td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadCompletionHandler</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__4 "><p class="p">上传完成后的回调函数</p></td> <td class="entry" headers="iOS_SDK___table_jxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <p class="p">无</p> <p class="p"><strong class="ph b">(4) putFileWithPath</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">根据路径上传文件</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="iOS_SDK___table_lxk_qzm_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_lxk_qzm_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="iOS_SDK___table_lxk_qzm_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="iOS_SDK___table_lxk_qzm_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="iOS_SDK___table_lxk_qzm_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="iOS_SDK___table_lxk_qzm_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__1 "><p class="p">path </p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__4 "><p class="p">上传路径</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__4 "><p class="p">上传到指定 bucket 名称</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__1 "><p class="p">key</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__4 "><p class="p">上传对应 bucket 里文件的 key</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__1 "><p class="p">option </p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadOption *</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__4 "><p class="p">上传时传入的可选参数实现上传文件时候的进度查看</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__1 "><p class="p">baseUrl</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__4 "> <p class="p">基础域名 e.g </p> <p class="p">@”obs-cn-shenzhen.yun.pingan.com”</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__1 "> <p class="p">Complete</p> <p class="p">Handler</p> </td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadCompletionHandler</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__4 "><p class="p">上传完成后的回调函数</p></td> <td class="entry" headers="iOS_SDK___table_lxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <p class="p">无</p> <p class="p"><strong class="ph b">(5) uploadImage</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">上传图片并压缩</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="iOS_SDK___table_nxk_qzm_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_nxk_qzm_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="iOS_SDK___table_nxk_qzm_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="iOS_SDK___table_nxk_qzm_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="iOS_SDK___table_nxk_qzm_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="iOS_SDK___table_nxk_qzm_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__1 "><p class="p">image</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__2 "><p class="p">UIImage *</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__4 "><p class="p">上传图片</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__1 "><p class="p">scale</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__2 "><p class="p">CGFloat</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__4 "><p class="p">压缩比例(图片尺寸根据比例压缩)</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__4 "><p class="p">上传到指定 bucket 名称</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__5 "><p class="p">bucket</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__1 "><p class="p">key</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__4 "><p class="p">上传对应 bucket 里文件的 key</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__5 "><p class="p">key</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__1 "><p class="p">option </p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadOption *</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__4 "><p class="p">上传时传入的可选参数实现上传文件时候的进度查看</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__5 "><p class="p">option </p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__1 "><p class="p">baseUrl</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__4 "> <p class="p">基础域名 e.g </p> <p class="p">@”obs-cn-shenzhen.yun.pingan.com”</p> </td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__5 "><p class="p">baseUrl</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__1 "> <p class="p">Complete</p> <p class="p">Handler</p> </td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadCompletionHandler</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__4 "><p class="p">上传完成后的回调函数</p></td> <td class="entry" headers="iOS_SDK___table_nxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <p class="p">无</p> <p class="p"><strong class="ph b">(6) sliceUploadFileWithPath</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p"> 分片上传文件</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="iOS_SDK___table_pxk_qzm_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_pxk_qzm_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="iOS_SDK___table_pxk_qzm_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="iOS_SDK___table_pxk_qzm_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="iOS_SDK___table_pxk_qzm_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="iOS_SDK___table_pxk_qzm_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__1 "><p class="p">filePath</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__4 "><p class="p">上传文件的路径</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__4 "><p class="p">上传到指定 bucket 名称</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__1 "><p class="p">key</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__4 "><p class="p">上传对应 bucket 里文件的 key</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__1 "><p class="p">option </p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadOption *</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__4 "><p class="p">上传时传入的可选参数实现上传文件时候的进度查看</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__1 "><p class="p">baseUrl</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__4 "> <p class="p">基础域名 e.g </p> <p class="p">@”obs-cn-shenzhen.yun.pingan.com”</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__1 "> <p class="p">complete</p> <p class="p">Handler</p> </td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadCompletionHandler</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__4 "><p class="p">上传完成后的回调函数</p></td> <td class="entry" headers="iOS_SDK___table_pxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <p class="p">无</p> <p class="p"><strong class="ph b">(7) downloadWithBucket</strong></p> <p class="p"><strong class="ph b">接口描述</strong></p> <p class="p">下载文件</p> <p class="p"><strong class="ph b">请求参数</strong></p> <table class="table" id="iOS_SDK___table_rxk_qzm_qlb"><caption></caption><colgroup><col><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="iOS_SDK___table_rxk_qzm_qlb__entry__1"><p class="p">参数名称</p></th> <th class="entry" id="iOS_SDK___table_rxk_qzm_qlb__entry__2"><p class="p">参数类型</p></th> <th class="entry" id="iOS_SDK___table_rxk_qzm_qlb__entry__3"><p class="p">是否必须</p></th> <th class="entry" id="iOS_SDK___table_rxk_qzm_qlb__entry__4"><p class="p">参数描述</p></th> <th class="entry" id="iOS_SDK___table_rxk_qzm_qlb__entry__5"><p class="p">备注</p></th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__1 "><p class="p">path</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__4 "><p class="p">保存路径</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__1 "><p class="p">bucket</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__4 "><p class="p">文件所在bucket</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__1 "><p class="p">key</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__4 "><p class="p">上传对应 bucket 里文件的 key</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__1 "><p class="p">host</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__2 "><p class="p">NSString *</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__3 "><p class="p">true</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__4 "><p class="p">服务器域名</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> <tr class="row"> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__1 "> <p class="p">complete</p> <p class="p">Handler</p> </td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__2 "><p class="p">IOBSUploadCompletionHandler</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__3 "><p class="p">false</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__4 "><p class="p">上传完成后的回调函数</p></td> <td class="entry" headers="iOS_SDK___table_rxk_qzm_qlb__entry__5 "><p class="p">-</p></td> </tr> </tbody></table> <p class="p"><strong class="ph b">响应参数</strong></p> <p class="p">无</p> </section>
Did the above content solve your problem? Yes No
Please complete information!

Call us

400-151-8800

Email us

cloud@pingan.com

Online customer service

Instant reply

Technical Support

cloud products