Skip to content

Commit

Permalink
fix: another unknown bug about file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
v1s10n-4 committed Sep 17, 2024
1 parent fbd4205 commit f7faa2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,10 @@ export const uploadImage: UploadImage = async (image, name) => {
body: formData,
method: "POST",
});
if (!thumbnailRes.ok) {
const error = await thumbnailRes.text();
console.log(thumbnailRes.status, thumbnailRes.statusText, error);
return { error: true, data: error };
}
return await thumbnailRes.json();
};

0 comments on commit f7faa2d

Please sign in to comment.