@karpeleslab/klbfw 0.1.9 → 0.1.10
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 +1 -1
- package/upload.js +6 -2
package/package.json
CHANGED
package/upload.js
CHANGED
|
@@ -141,7 +141,7 @@ module.exports.upload = (function () {
|
|
|
141
141
|
up['status'] = 'uploading';
|
|
142
142
|
upload.run();
|
|
143
143
|
}).catch(res => failure(up, res))
|
|
144
|
-
|
|
144
|
+
return;
|
|
145
145
|
}
|
|
146
146
|
// Method 2: PUT requests
|
|
147
147
|
if (res["data"]["PUT"]) {
|
|
@@ -159,7 +159,7 @@ module.exports.upload = (function () {
|
|
|
159
159
|
up.b = {};
|
|
160
160
|
up['status'] = 'uploading';
|
|
161
161
|
upload.run();
|
|
162
|
-
|
|
162
|
+
return;
|
|
163
163
|
}
|
|
164
164
|
// invalid data
|
|
165
165
|
up.reject();
|
|
@@ -213,6 +213,7 @@ module.exports.upload = (function () {
|
|
|
213
213
|
sendprogress();
|
|
214
214
|
upload.run();
|
|
215
215
|
}).catch(res => failure(up, res));
|
|
216
|
+
break;
|
|
216
217
|
case 'put':
|
|
217
218
|
let headers = {};
|
|
218
219
|
headers["Content-Type"] = up.file.type;
|
|
@@ -232,6 +233,7 @@ module.exports.upload = (function () {
|
|
|
232
233
|
sendprogress();
|
|
233
234
|
upload.run();
|
|
234
235
|
}).catch(res => failure(up, res));
|
|
236
|
+
break;
|
|
235
237
|
}
|
|
236
238
|
});
|
|
237
239
|
|
|
@@ -286,6 +288,7 @@ module.exports.upload = (function () {
|
|
|
286
288
|
upload.run();
|
|
287
289
|
}).catch(res => failure(up, res));
|
|
288
290
|
}).catch(res => failure(up, res));
|
|
291
|
+
break;
|
|
289
292
|
case 'put':
|
|
290
293
|
// complete, directly call handleComplete
|
|
291
294
|
rest.rest(up.info.Complete, "POST", {}, up.context).then(function (ares) {
|
|
@@ -297,6 +300,7 @@ module.exports.upload = (function () {
|
|
|
297
300
|
delete upload_running[up.up_id];
|
|
298
301
|
upload.run();
|
|
299
302
|
}).catch(res => failure(up, res));
|
|
303
|
+
break;
|
|
300
304
|
}
|
|
301
305
|
}
|
|
302
306
|
}
|