@quantcdn/quant-client 2.0.2 → 2.0.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/client.js CHANGED
@@ -153,14 +153,21 @@ class QuantClient {
153
153
  */
154
154
  file: (payload) => __awaiter(this, void 0, void 0, function* () {
155
155
  const headers = {
156
- 'Content-Type': 'multipart/form-data',
157
- 'Quant-File-Url': payload.location
156
+ 'Quant-File-Url': payload.url
158
157
  };
159
- const formData = { data: payload.data };
160
158
  if (typeof payload.skipPurge !== 'undefined') {
161
159
  headers['Quant-Skip-Purge'] = 'true';
162
160
  }
163
- return yield this._project.post('file', {}, headers, formData);
161
+ const formData = {
162
+ file: {
163
+ value: payload.data,
164
+ options: {
165
+ filename: 'file',
166
+ contentType: 'application/octet-stream'
167
+ }
168
+ }
169
+ };
170
+ return yield this._project.post('file', undefined, headers, formData);
164
171
  }),
165
172
  /**
166
173
  * Publish a revision.
package/dist/types.d.ts CHANGED
@@ -19,7 +19,7 @@ export interface MarkupPayload {
19
19
  }
20
20
  export interface FilePayload {
21
21
  data: Buffer;
22
- location: string;
22
+ url: string;
23
23
  skipPurge?: boolean;
24
24
  }
25
25
  export interface PublishPayload {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantcdn/quant-client",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Client library for API connectivity",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",