Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RusovDmitriy committed Jan 13, 2025
1 parent caed6c5 commit 9578b49
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/cubejs-backend-cloud/src/cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down

0 comments on commit 9578b49

Please sign in to comment.