mirror of
https://github.com/documenso/documenso.git
synced 2025-11-25 22:21:31 +10:00
fix: implement feedback
This commit is contained in:
@ -42,11 +42,15 @@ const updateFileWithBytes64 = (data: string) => {
|
||||
const updateFileWithS3 = async (key: string, data: string) => {
|
||||
const { url } = await getAbsolutePresignPostUrl(key);
|
||||
|
||||
await fetch(url, {
|
||||
const response = await fetch(url, {
|
||||
method: 'PUT',
|
||||
body: data,
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to update file "${key}", failed with status code ${response.status}`);
|
||||
}
|
||||
|
||||
return {
|
||||
type: DocumentDataType.S3_PATH,
|
||||
data: key,
|
||||
|
||||
Reference in New Issue
Block a user