mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
fix: implement feedback
This commit is contained in:
@ -35,9 +35,15 @@ const getFileFromBytes64 = (data: string) => {
|
||||
const getFileFromS3 = async (key: string) => {
|
||||
const { url } = await getPresignGetUrl(key);
|
||||
|
||||
const buffer = await fetch(url, {
|
||||
const response = await fetch(url, {
|
||||
method: 'GET',
|
||||
}).then(async (res) => res.arrayBuffer());
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to get file "${key}", failed with status code ${response.status}`);
|
||||
}
|
||||
|
||||
const buffer = await response.arrayBuffer();
|
||||
|
||||
const binaryData = new Uint8Array(buffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user