From 6d42fcfb6f1f36f4505d280807e7b73d7228e017 Mon Sep 17 00:00:00 2001 From: Saahil Date: Sun, 1 Dec 2024 22:34:26 -0500 Subject: [PATCH] fix: cdn --- package.json | 1 + src/commands/colbalt_api.ts | 1 + yarn.lock | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/package.json b/package.json index 350b696..21d8f8f 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "cheerio": "^1.0.0", "dotenv": "^16.4.5", "eventsource": "latest", + "form-data": "^4.0.1", "ms": "^2.1.3", "node-cron": "^3.0.3", "node-ical": "^0.20.1", diff --git a/src/commands/colbalt_api.ts b/src/commands/colbalt_api.ts index 8a62a04..b46994a 100644 --- a/src/commands/colbalt_api.ts +++ b/src/commands/colbalt_api.ts @@ -73,6 +73,7 @@ export default class Message implements Command { Embed: "true", "No-JSON": "true", "Expires-At": "7d", + ...form.getHeaders(), // This will include the correct 'Content-Type' header with boundary }, body: formData, // send the file as a multipart/form-data diff --git a/yarn.lock b/yarn.lock index c668879..7ea7d77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1800,6 +1800,15 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" + integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + formdata-node@^4.3.2: version "4.4.1" resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-4.4.1.tgz#23f6a5cb9cb55315912cbec4ff7b0f59bbd191e2"