code7-leia 0.2.6 → 0.2.8
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/code7-leia.cjs.development.js +6 -6
- package/dist/code7-leia.cjs.development.js.map +1 -1
- package/dist/code7-leia.cjs.production.min.js +1 -1
- package/dist/code7-leia.cjs.production.min.js.map +1 -1
- package/dist/code7-leia.esm.js +6 -6
- package/dist/code7-leia.esm.js.map +1 -1
- package/dist/components/CustomToast/index.d.ts +4 -4
- package/dist/components/CustomToast/styles.d.ts +2 -2
- package/dist/store/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/store/modules/sagas.ts +14 -6
|
@@ -2191,7 +2191,7 @@ function testSaga(action) {
|
|
|
2191
2191
|
}, _marked3, null, [[0, 12, 15, 19]]);
|
|
2192
2192
|
}
|
|
2193
2193
|
function uploadFilesSaga(action) {
|
|
2194
|
-
var t, _action$payload4, id, file, pressets, token,
|
|
2194
|
+
var t, _action$payload4, id, file, pressets, token, blob, formData, queryParams, url, _yield$call4, data;
|
|
2195
2195
|
return _regeneratorRuntime().wrap(function uploadFilesSaga$(_context4) {
|
|
2196
2196
|
while (1) switch (_context4.prev = _context4.next) {
|
|
2197
2197
|
case 0:
|
|
@@ -2201,15 +2201,15 @@ function uploadFilesSaga(action) {
|
|
|
2201
2201
|
return effects.put(commonLoadingStart());
|
|
2202
2202
|
case 4:
|
|
2203
2203
|
_action$payload4 = action.payload, id = _action$payload4.id, file = _action$payload4.file, pressets = _action$payload4.pressets, token = _action$payload4.token;
|
|
2204
|
-
tags = pressets.join(',');
|
|
2205
2204
|
blob = new Blob([file.content]);
|
|
2206
2205
|
formData = new FormData();
|
|
2207
2206
|
formData.append('file', blob, file.properties.path);
|
|
2208
|
-
queryParams = new URLSearchParams({
|
|
2209
|
-
tags:
|
|
2210
|
-
}).toString();
|
|
2207
|
+
queryParams = pressets.length ? new URLSearchParams({
|
|
2208
|
+
tags: pressets.join(',')
|
|
2209
|
+
}).toString() : '';
|
|
2210
|
+
url = queryParams ? "/upload/" + id + "?token=" + token + "&" + queryParams : "/upload/" + id + "?token=" + token;
|
|
2211
2211
|
_context4.next = 12;
|
|
2212
|
-
return effects.call(api.post,
|
|
2212
|
+
return effects.call(api.post, url, formData, {
|
|
2213
2213
|
headers: {
|
|
2214
2214
|
'Content-Type': 'multipart/form-data'
|
|
2215
2215
|
}
|