Skip to content

Commit

Permalink
Fix CORS Issue in Client-Side Fetching Mode for Image to Base64 Conve…
Browse files Browse the repository at this point in the history
…rsion
  • Loading branch information
samurai00 committed Jan 14, 2025
1 parent da00a35 commit 9757ff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/imageToBase64.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const imageUrlToBase64 = async (
imageUrl: string,
): Promise<{ base64: string; mimeType: string }> => {
try {
const res = await fetch(imageUrl);
const res = await fetch(imageUrl, { cache: 'no-store' });
const blob = await res.blob();
const arrayBuffer = await blob.arrayBuffer();

Expand Down

0 comments on commit 9757ff9

Please sign in to comment.