Skip to content

Commit

Permalink
chore: changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryAnansky committed Jan 20, 2025
1 parent a3a9bb8 commit 8e41a8e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/cli/src/cms/api/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,9 @@ class RemotesApi {
payload.commit.createdAt && formData.append('commit[createdAt]', payload.commit.createdAt);

for (const file of files) {
const blob =
file.stream instanceof Buffer
? new Blob([file.stream])
: new Blob([await streamToBuffer(file.stream)]);
const blob = Buffer.isBuffer(file.stream)
? new Blob([file.stream])
: new Blob([await streamToBuffer(file.stream)]);
formData.append(`files[${file.path}]`, blob, file.path);
}

Expand Down

0 comments on commit 8e41a8e

Please sign in to comment.