fix:重新生成文件名UUID

feature/pay-0704-ch
ch 2 years ago
parent 6089283696
commit a20f84dd7e

@ -2,11 +2,12 @@
* @Author: ch
* @Date: 2022-07-07 17:27:04
* @LastEditors: ch
* @LastEditTime: 2022-07-11 17:24:09
* @LastEditTime: 2022-07-11 17:34:08
* @Description: file content
*/
import { ElMessage } from '@/plugins/element-plus';
import request from '@/utils/request';
import { CreateUUID } from '@/utils/utils';
// OSS签名
export function sign(serviceName, configId) {
return request({
@ -40,7 +41,7 @@ export async function upload(serviceName, configId, file, cancelToken, suffix) {
oss = await payCenterSign();
}
const data = new FormData();
const name = file.uid + _suffix;
const name = CreateUUID() + _suffix;
data.append('name', name);
data.append('key', `${oss.dir}${name}`);
data.append('policy', oss.policy);

Loading…
Cancel
Save