Skip to content

Commit d4015d5

Browse files
authored
Merge pull request #99 from nongcundeshifu/fix-getObject-add-range-options-types
Fix:修复类型定义中getObject方法的options不包含Range选项的问题
2 parents 02916b0 + 37bda63 commit d4015d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ declare namespace COS {
6868
type Initiator = Owner;
6969
/** 单个授权信息 */
7070
type Grant = string;
71+
/** RFC 2616 中定义的字节范围。 @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 */
72+
type Range = string;
7173
/** 被授权者信息与权限信息 */
7274
interface Grants {
7375
/** 所有者的信息 */
@@ -1150,6 +1152,8 @@ declare namespace COS {
11501152
/** getObject 接口参数 */
11511153
interface GetObjectParams extends ObjectParams {
11521154
BodyType?: 'text' | 'blob' | 'arraybuffer',
1155+
/** 下载对象的指定范围字节。参见 RFC 2616 中定义的字节范围,see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35。范围值必须使用 bytes=first-last 格式且仅支持单一范围,不支持多重范围。first 和 last 都是基于0开始的偏移量。例如 bytes=0-9 表示下载对象的开头10个字节的数据 ,如果不指定,则表示下载整个对象 */
1156+
Range?: Range;
11531157
/** 写入流,可以传本地文件写入流 */
11541158
Output?: Stream,
11551159
/** 请求里的 Url Query 参数,传入该值中的 key/value 将会被 URLEncode */

0 commit comments

Comments
 (0)