fix(models/rest): unique key for form data item

This commit is contained in:
ayntee 2021-01-28 20:05:12 +04:00 committed by GitHub
parent 6d21c762de
commit 6a58a69031
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -319,9 +319,7 @@ export class RESTManager {
}
}
const form = new FormData()
for (const file of files) {
form.append(file.name, file.blob, file.name)
}
files.map((file, index) => form.append(`file${index + 1}`, file.blob, file.name))
const json = JSON.stringify(body)
form.append('payload_json', json)
if (body === undefined) body = {}