From 19e170513aaaebb1a655633086436613f9d33d41 Mon Sep 17 00:00:00 2001 From: "green." <41323182+greeeen-dev@users.noreply.github.com> Date: Thu, 13 Feb 2025 21:03:39 +0100 Subject: [PATCH] fix: add authentication token to headers for file upload --- revolt/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/revolt/http.py b/revolt/http.py index 8ce0bea..de2a2c4 100755 --- a/revolt/http.py +++ b/revolt/http.py @@ -94,7 +94,8 @@ async def upload_file(self, file: File, tag: Literal["attachments", "avatars", " url = f"{self.api_info['features']['autumn']['url']}/{tag}" headers = { - "User-Agent": "Revolt.py (https://github.com/revoltchat/revolt.py)" + "User-Agent": "Revolt.py (https://github.com/revoltchat/revolt.py)", + self.auth_header: self.token } form = aiohttp.FormData()