From 9578b4929aa345aad3fb9d6d8fdccaf25c582c09 Mon Sep 17 00:00:00 2001 From: Dmitriy Rusov Date: Mon, 13 Jan 2025 12:54:14 +0100 Subject: [PATCH] fix --- packages/cubejs-backend-cloud/src/cloud.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/cubejs-backend-cloud/src/cloud.ts b/packages/cubejs-backend-cloud/src/cloud.ts index 93d2dfd31073b..2c14e3cff8d3a 100644 --- a/packages/cubejs-backend-cloud/src/cloud.ts +++ b/packages/cubejs-backend-cloud/src/cloud.ts @@ -113,22 +113,18 @@ export class CubeCloudClient { const formData = new FormData(); formData.append('transaction', JSON.stringify(transaction)); formData.append('fileName', fileName); - formData.append('file', { - value: data, - options: { - filename: path.basename(fileName), - contentType: 'application/octet-stream' - } + formData.append('file', data, { + filename: path.basename(fileName), + contentType: 'application/octet-stream' }); // Get the form data buffer and headers - const formDataBuffer = formData.getBuffer(); const formDataHeaders = formData.getHeaders(); return this.request({ url: (deploymentId: string) => `build/deploy/${deploymentId}/upload-file${this.extendRequestByLivePreview()}`, method: 'POST', - body: formDataBuffer, + body: formData, headers: { ...formDataHeaders, },