Use the correct name for files (#4037)

This commit is contained in:
Fleny
2024-12-04 16:47:06 +05:30
committed by GitHub
parent b83af688d5
commit 848285968c
+1 -1
View File
@@ -257,7 +257,7 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
if (options?.files !== undefined) {
const form = new FormData()
for (let i = 0; i < options.files.length; ++i) {
form.append(`file${i}`, options.files[i].blob, options.files[i].name)
form.append(`files[${i}]`, options.files[i].blob, options.files[i].name)
}
// Have to use changeToDiscordFormat or else JSON.stringify may throw an error for the presence of BigInt(s) in the json