@ebl-vue/editor-full 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@ import ImageTool from "../../plugins/imageTool";
|
|
|
45
45
|
import {ImageToolTune } from "../../plugins/imageResizeCrop";
|
|
46
46
|
|
|
47
47
|
const EblEditorSettings: IEblEditorSettings | undefined = inject("EblEditorSettings");
|
|
48
|
-
|
|
48
|
+
console.log("EblEditorSettings",EblEditorSettings);
|
|
49
49
|
defineOptions({
|
|
50
50
|
name: 'EblEditor',
|
|
51
51
|
inheritAttrs: false
|
|
@@ -104,12 +104,13 @@ export default class Uploader {
|
|
|
104
104
|
headers[tokenName] = tokenPrefix + " " + token
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
+
headers["Content-Type"] = "application/json";
|
|
107
108
|
const axiosInstance: AxiosInstance = axios.create({
|
|
108
109
|
timeout: 1800000,
|
|
109
110
|
headers: headers,
|
|
110
111
|
});
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
|
|
113
|
+
//console.log("this.config.endpoints", this.config.endpoints);
|
|
113
114
|
const uploadBodyRes = await axiosInstance.post(this.config.endpoints.byFile!, {
|
|
114
115
|
"fileName": file.name,
|
|
115
116
|
"contentType": file.type
|
|
@@ -127,15 +128,17 @@ export default class Uploader {
|
|
|
127
128
|
cdn = uploadRes.data.cdn;
|
|
128
129
|
objectKey = uploadRes.data.objectKey;
|
|
129
130
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
//headers["Content-Type"] = file.type;
|
|
132
|
+
|
|
133
|
+
const axiosUpload: AxiosInstance = axios.create({
|
|
134
|
+
timeout: 1800000,
|
|
135
|
+
headers: { "Content-Type": file.type }
|
|
136
|
+
});
|
|
137
|
+
let upload = axiosUpload.put(uploadRes.data.presignedUrl, file);
|
|
136
138
|
|
|
137
139
|
|
|
138
140
|
upload.then((response) => {
|
|
141
|
+
|
|
139
142
|
if (response.status === 200) {
|
|
140
143
|
response = {
|
|
141
144
|
success: 1,
|