fedimbed: stop trying to blob a HEAD for size
This commit is contained in:
parent
dff6bb3e27
commit
ea21e71c10
1 changed files with 2 additions and 6 deletions
|
@ -454,9 +454,7 @@ async function processUrl(msg, url, spoiler = false) {
|
|||
headers: {
|
||||
"User-Agent": FRIENDLY_USERAGENT,
|
||||
},
|
||||
})
|
||||
.then((res) => res.blob())
|
||||
.then((blob) => blob.size);
|
||||
}).then((res) => Number(res.headers.get("Content-Length")));
|
||||
|
||||
if (size <= getUploadLimit(msg.channel.guild)) {
|
||||
const file = await fetch(attachment.url, {
|
||||
|
@ -487,9 +485,7 @@ async function processUrl(msg, url, spoiler = false) {
|
|||
headers: {
|
||||
"User-Agent": FRIENDLY_USERAGENT,
|
||||
},
|
||||
})
|
||||
.then((res) => res.blob())
|
||||
.then((blob) => blob.size);
|
||||
}).then((res) => Number(res.headers.get("Content-Length")));
|
||||
|
||||
if (size <= getUploadLimit(msg.channel.guild)) {
|
||||
const file = await fetch(attachment.url, {
|
||||
|
|
Loading…
Reference in a new issue