初始化模版工程

This commit is contained in:
Cloud Bot
2026-03-20 07:33:46 +00:00
commit 23717e0ecd
386 changed files with 51675 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { getSTSToken } from '@/package/apis/oss'
import { createCustomOSSUploader } from '@bty/uploader'
export async function uploadFile(
file: File,
filePath: string,
headers?: Record<string, string>,
) {
const uploader = createCustomOSSUploader(getSTSToken)
return await uploader.multipartUpload({
file,
filePath,
options: {
headers,
onProgress: (progress: number) => {
console.log(progress)
},
},
})
}