Skip to content

Commit

Permalink
Buffer for readFile
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiancook committed Sep 7, 2023
1 parent 40b6384 commit 77a25ab
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/data/file/r2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,7 @@ export async function readFileFromR2(file: FileData) {
});
const response = await client.send(command);
const array = await response.Body.transformToByteArray();
return fromMaybeDurableBody(new Blob([array], {
type: file.contentType
}));
return Buffer.from(array);
}

export async function unlinkFromR2(file: FileData) {
Expand Down

0 comments on commit 77a25ab

Please sign in to comment.