Update imageUpload.js
Browse files- imageUpload.js +1 -1
imageUpload.js
CHANGED
@@ -26,7 +26,7 @@ function uploadImageAndGetFullUrl(uploadEndpoint, hostUrl, file) {
|
|
26 |
|
27 |
// 压缩图片并上传
|
28 |
return compressImage(file).then(compressedFile => {
|
29 |
-
formData.append(
|
30 |
return fetch(`${hostUrl}${uploadEndpoint}`, {
|
31 |
method: 'POST',
|
32 |
body: formData
|
|
|
26 |
|
27 |
// 压缩图片并上传
|
28 |
return compressImage(file).then(compressedFile => {
|
29 |
+
formData.append("file", file);
|
30 |
return fetch(`${hostUrl}${uploadEndpoint}`, {
|
31 |
method: 'POST',
|
32 |
body: formData
|