阿里云OSS设置

This commit is contained in:
李琦
2026-07-14 10:05:33 +08:00
parent 8ac9f591a0
commit 02cf290bad
16 changed files with 782 additions and 244 deletions

View File

@@ -46,7 +46,7 @@ const uploadFile = async (file: File) => {
const formData = new FormData()
formData.append('file', file)
if (props.categoryId) formData.append('categoryId', props.categoryId.toString())
formData.append('storageType', 'local')
formData.append('storageType', 'aliyun')
const result = await parseApiResponse<{ fileUrl: string }>(
await authFetch(`${API_BASE}/admin/attachments/upload`, { method: 'POST', headers: {}, body: formData })
)