qiscus-sdk-core 2.12.2 → 2.12.3
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/qiscus-sdk-core.min.js +2 -2
- package/dist/qiscus-sdk-core.min.js.map +1 -1
- package/lib/index.js +4 -1
- package/package.json +1 -1
- package/dist/qiscus-sdk-core.js +0 -28496
- package/dist/qiscus-sdk-core.js.map +0 -1
package/lib/index.js
CHANGED
|
@@ -2235,7 +2235,10 @@ var QiscusSDK = /*#__PURE__*/function () {
|
|
|
2235
2235
|
}, {
|
|
2236
2236
|
key: "upload",
|
|
2237
2237
|
value: function upload(file, callback) {
|
|
2238
|
-
|
|
2238
|
+
var req = _superagent["default"].post(this.uploadURL);
|
|
2239
|
+
|
|
2240
|
+
req = this.HTTPAdapter.setupHeaders(req);
|
|
2241
|
+
return req.attach('file', file).on('progress', function (event) {
|
|
2239
2242
|
if (event.direction === 'upload') callback(null, event);
|
|
2240
2243
|
}).then(function (resp) {
|
|
2241
2244
|
var url = resp.body.results.file.url;
|