文件模块

一、aliOss获取临时凭证

接口地址 https://www.yingxiongyun.com/file/api/v1/t/files/checkSignature

请求方式 POST

consumes ["application/json"]

produces ["*/*"]

接口描述 ``

请求参数

参数名称参数说明请求类型是否必须数据类型schema
bodybodybodytrue文件创建请求体文件创建请求体

 

schema属性说明

文件创建请求体

参数名称参数说明请求类型是否必须数据类型schema
fileType上传的文件类型,可用值:OTHER,APP,KNOWLEDGEbodytruestring 
appId应用idbodyfalsestring 
formId表单idbodyfalsestring 
knowledgeId知识库idbodyfalsestring 
componentId组件idbodytruestring 
type上传文件类型,可用值:FILE,IMAGES,VIDEO,EXCELbodytruestring 
module上传文件模块,可用值:SYSTEM,TENANT,WORKSHEET,WORKFLOWbodytruestring 
originalFileName文件源名称bodytruestring 
originalSize文件大小bodytruenteger 

 

 

响应状态

状态码说明schema
200OK响应结果对象«Map«string,string»»
201Created 
401Unauthorized 
403Forbidden 
404Not Found 

 

响应参数

参数名称参数说明类型schema
code结果码integer(int32)integer(int32)
data结果数据object 
message结果描述string 
timestamp时间戳integer(int64)integer(int64)

 

响应示例

二、文件上传

接口地址 https://yingxiongyun.oss-cn-shenzhen.aliyuncs.com/

请求方式 POST

consumes ["application/json"]

produces ["*/*"]

接口描述 ``

请求参数

参数名称参数说明请求类型是否必须数据类型schema
bodybodybodytrue文件创建请求体文件创建请求体

 

schema属性说明

文件创建请求体

参数名称参数说明请求类型是否必须数据类型schema
key上传到Bucket内的Object的完整路径bodytruestring 
policy用户表单上传的策略(Policy),Policy为经过Base64编码过的字符串。bodytruestring(byte) 
OSSAccessKeyId用户请求的AccessKey IDbodytruestring 
success_action_status设置服务端返回状态码bodytruestring 
callbackbase64加密回调信息bodytruestring 
signature对Policy签名后的字符串bodytruestring 
file二进制文件bodytruefile 

 

 

响应状态

状态码说明schema
200OK响应结果对象«Map«string,string»»
201Created 
401Unauthorized 
403Forbidden 
404Not Found 

 

响应参数

参数名称参数说明类型schema
code结果码integer(int32)integer(int32)
data结果数据object 
message结果描述string 
timestamp时间戳integer(int64)integer(int64)

 

响应示例