@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 +11 -4
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
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
|
-
'
|
|
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
|
-
|
|
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