Skip to content

Commit 93395df

Browse files
committed
fix(src/api/base/index.ts): 富文本无法上传图片
富文本调用上传接口时,content-type 为 application/json导致无法上传图片,修改上传接口,指定 content-type 为 multipart/form-data解决问题 Closes bufanyun#109
1 parent ea7cc97 commit 93395df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

web/src/api/base/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export function UploadImage(params) {
1616
const headers = {
1717
Authorization: useUserStore.token,
1818
uploadType: 'default',
19+
'Content-Type': 'multipart/form-data',
1920
};
2021
return http.request({
2122
url: '/upload/file',

0 commit comments

Comments
 (0)