Commit de795f63 by zhangleyuan

feat:解决报错

parent 21da8319
/*
* @Author: 吴文洁
* @Date: 2020-10-27 18:53:43
* @LastEditors: 吴文洁
* @LastEditTime: 2020-12-21 17:42:22
* @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-14 10:45:21
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -11,17 +11,17 @@ import Service from '@/common/js/service';
class Upload {
static uploadBlobToOSS(Blob: any, name: string, dataType: string = 'url') {
const { instId } = window.currentUserInstInfo;
return Service.MFS('anon/mfs/webTokenWithAccessUrl', {
instId,
resourceName: name,
}).then((res) => {
const signInfo = res.result;
const { url } = res.result
return this.uploadBlobToNewOSS(Blob, name, signInfo.signatureVO || signInfo).then(() => {
return dataType === 'url' ? url : signInfo
});
})
// const { instId } = window.currentUserInstInfo;
// return Service.MFS('anon/mfs/webTokenWithAccessUrl', {
// instId,
// resourceName: name,
// }).then((res) => {
// const signInfo = res.result;
// const { url } = res.result
// return this.uploadBlobToNewOSS(Blob, name, signInfo.signatureVO || signInfo).then(() => {
// return dataType === 'url' ? url : signInfo
// });
// })
};
static uploadBlobToNewOSS(Blob: any, name: string, signInfo: any) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment