@efox/upload-file
Version:
支持所有类型的文件上传到腾讯云,上传完成上报文件MD5、类型、URL、项目名称、用户uid
23 lines (21 loc) • 498 B
JavaScript
import fetchInstance from './fetch-instance'
import config from './config'
export async function getUploadToken (filePath) {
return fetchInstance({
url: config.apiUrl + '/common/genUploadToken',
method: 'get',
params: {
filePath
}
})
}
export async function genMultipartUploadToken (filePath, httpMethod) {
return fetchInstance({
url: config.apiUrl + '/common/genMultipartUploadToken',
method: 'get',
params: {
filePath,
httpMethod
}
})
}