@swan-admin/swan-ai-measurements 1.0.90 → 1.0.91
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/dist/esm/fileUpload.js +3 -0
- package/dist/fileUpload.js +3 -0
- package/package.json +1 -1
- package/src/fileUpload.ts +4 -0
package/dist/esm/fileUpload.js
CHANGED
|
@@ -172,6 +172,7 @@ class FileUpload {
|
|
|
172
172
|
parts.push({ PartNumber: i + 1, ETag: '"958057f9cd1d264e94fcc0d2ccabc09f"' });
|
|
173
173
|
console.log(val === null || val === void 0 ? void 0 : val.data, "after uploading");
|
|
174
174
|
}
|
|
175
|
+
console.log(parts, "parts");
|
|
175
176
|
const completeValue = yield fetchData({
|
|
176
177
|
path: FILE_UPLOAD_ENDPOINT.UPLOAD_COMPLETE,
|
|
177
178
|
apiKey: __classPrivateFieldGet(this, _FileUpload_accessKey, "f"),
|
|
@@ -181,7 +182,9 @@ class FileUpload {
|
|
|
181
182
|
parts,
|
|
182
183
|
originalFileName: file.name,
|
|
183
184
|
},
|
|
185
|
+
throwError: true,
|
|
184
186
|
});
|
|
187
|
+
console.log(completeValue, "after complete");
|
|
185
188
|
resolve({ message: "successfully uploaded", data: completeValue });
|
|
186
189
|
} catch (error) {
|
|
187
190
|
reject(error);
|
package/dist/fileUpload.js
CHANGED
|
@@ -120,6 +120,7 @@ class FileUpload {
|
|
|
120
120
|
parts.push({ PartNumber: i + 1, ETag: '"958057f9cd1d264e94fcc0d2ccabc09f"' });
|
|
121
121
|
console.log(val?.data, "after uploading");
|
|
122
122
|
}
|
|
123
|
+
console.log(parts, "parts");
|
|
123
124
|
const completeValue = await (0, utils_js_1.fetchData)({
|
|
124
125
|
path: constants_js_1.FILE_UPLOAD_ENDPOINT.UPLOAD_COMPLETE,
|
|
125
126
|
apiKey: this.#accessKey,
|
|
@@ -129,7 +130,9 @@ class FileUpload {
|
|
|
129
130
|
parts,
|
|
130
131
|
originalFileName: file.name,
|
|
131
132
|
},
|
|
133
|
+
throwError: true,
|
|
132
134
|
});
|
|
135
|
+
console.log(completeValue, "after complete");
|
|
133
136
|
resolve({ message: "successfully uploaded", data: completeValue });
|
|
134
137
|
}
|
|
135
138
|
catch (error) {
|
package/package.json
CHANGED
package/src/fileUpload.ts
CHANGED
|
@@ -142,6 +142,7 @@ export default class FileUpload {
|
|
|
142
142
|
parts.push({ PartNumber: i + 1, ETag: '"958057f9cd1d264e94fcc0d2ccabc09f"' });
|
|
143
143
|
console.log(val?.data, "after uploading");
|
|
144
144
|
}
|
|
145
|
+
console.log(parts, "parts");
|
|
145
146
|
const completeValue = await fetchData({
|
|
146
147
|
path: FILE_UPLOAD_ENDPOINT.UPLOAD_COMPLETE,
|
|
147
148
|
apiKey: this.#accessKey,
|
|
@@ -151,7 +152,10 @@ export default class FileUpload {
|
|
|
151
152
|
parts,
|
|
152
153
|
originalFileName: file.name,
|
|
153
154
|
},
|
|
155
|
+
throwError: true,
|
|
154
156
|
});
|
|
157
|
+
console.log(completeValue, "after complete");
|
|
158
|
+
|
|
155
159
|
resolve({ message: "successfully uploaded", data: completeValue });
|
|
156
160
|
} catch (error: any) {
|
|
157
161
|
reject(error);
|