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/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
- return _superagent["default"].post(this.uploadURL).attach('file', file).set('qiscus_sdk_app_id', this.AppId).set('qiscus_sdk_token', this.userData.token).set('qiscus_sdk_user_id', this.user_id).on('progress', function (event) {
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qiscus-sdk-core",
3
- "version": "2.12.2",
3
+ "version": "2.12.3",
4
4
  "description": "Qiscus Web SDK Core",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",