UNPKG

@shencom/api

Version:
45 lines (42 loc) 1.18 kB
declare namespace SC { export namespace File { export interface Info { createdAt: number; /** 本地文件名 */ fileName: string; /** 文件大小 */ fileSize: number; id: string; /** etag字段 */ remark: string; /** 上传文件随机的名 */ name: string; /** 文件绝对路径 */ remoteUrl: string; /** 是否为签名上传:0否,1是 */ sign: boolean | 0 | 1; /** etag */ etag: string; } export interface Sign { /** OSS 的 `AccessKeyId` */ accessid: string; /** 上传所需policy信息 */ policy: string; /** 签名信息 */ signature: string; /** 用户上传文件时指定的前缀 如: `gov_sc/files/` */ dir: string; /** 上传存储空间的访问域名 如: `https://xxx-public.oss-cn-shenzhen.aliyuncs.com` */ host: string; /** 签名到期时间 */ expire: string; } export interface SignV2 extends Omit<Sign, 'dir'> { /** 上传至 oss 的完整文件路径 */ objectName: string; /** 请求参数中的 name */ name: string; } } }