diff --git a/apps/admin/src/components/MediaUpload.vue b/apps/admin/src/components/MediaUpload.vue index ca863e2..003f1f3 100644 --- a/apps/admin/src/components/MediaUpload.vue +++ b/apps/admin/src/components/MediaUpload.vue @@ -60,9 +60,7 @@ async function doUpload({ file, onFinish, onError }: UploadCustomRequestOptions) try { const fd = new FormData(); fd.append('file', file.file as File); - const res: any = await post(`/upload?type=${props.type}`, fd, { - headers: { 'Content-Type': 'multipart/form-data' }, - }); + const res: any = await post(`/upload?type=${props.type}`, fd); emit('update:modelValue', [ ...(props.modelValue || []), { key: res.key, url: res.url, name: res.name, type: props.type }, diff --git a/apps/admin/src/views/Outbound.vue b/apps/admin/src/views/Outbound.vue index 83290bc..6db6449 100644 --- a/apps/admin/src/views/Outbound.vue +++ b/apps/admin/src/views/Outbound.vue @@ -66,7 +66,7 @@ async function doImport({ file, onFinish, onError }: UploadCustomRequestOptions) try { const fd = new FormData(); fd.append('file', file.file as File); - const res: any = await post('/outbound/import', fd, { headers: { 'Content-Type': 'multipart/form-data' } }); + const res: any = await post('/outbound/import', fd); const jobId = res.jobId; let job: any = null; for (let i = 0; i < 40; i++) {