mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-23 00:29:10 -05:00
fix(MoreStickers): CORS bug (#73)
* fix(MoreStickers): Animation Stickers * fix(MoreStickers): some stickers can't be sent because of CORS bug in Chrome.
This commit is contained in:
parent
9d31150927
commit
20996959ff
1 changed files with 3 additions and 2 deletions
|
@ -134,8 +134,9 @@ export async function sendSticker({
|
|||
file = await toGIF(sticker.image, ffmpegState.ffmpeg);
|
||||
}
|
||||
else {
|
||||
const response = await fetch(sticker.image, { cache: "force-cache" });
|
||||
// const blob = await response.blob();
|
||||
const url = new URL(sticker.image);
|
||||
url.searchParams.set("t", Date.now().toString()); // To prevent caching, in order to avoid CORS bug in Chrome
|
||||
const response = await fetch(sticker.image);
|
||||
const orgImageUrl = URL.createObjectURL(await response.blob());
|
||||
const processedImage = await resizeImage(orgImageUrl);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue