This commit is contained in:
张良(004796)
2024-02-23 15:22:21 +08:00
parent 830e6ef3f5
commit 2fca7ccdfc

View File

@@ -128,7 +128,7 @@ export function useUpload() {
const randomNum = Math.floor(Math.random() * 10000); const randomNum = Math.floor(Math.random() * 10000);
const timestamp = new Date().format('yyyyMMddhhmmss'); const timestamp = new Date().format('yyyyMMddhhmmss');
const extension = file.name.split(".").pop(); const extension = file.name.split(".").pop();
return `${policy.key}/${timestamp}-${randomNum}.${extension}`; return `${policy.key}${timestamp}-${randomNum}.${extension}`;
} }
const client = new OSS({ const client = new OSS({