文件发送默认为 post

This commit is contained in:
2betop 2020-04-30 13:38:16 +08:00
parent 19cf23c7b5
commit 58bb7bfeb7
1 changed files with 3 additions and 1 deletions

View File

@ -177,7 +177,9 @@ export default class RichTextControl extends React.Component<
const formData = new FormData();
formData.append('file', blobInfo.blob(), blobInfo.filename());
try {
const response = await fetcher(props.reciever, formData);
const response = await fetcher(props.reciever, formData, {
method: 'post',
});
if (response.ok) {
ok(response.data?.link || response.data?.value || (response as any).link);
}