Merge pull request #98 from ayntee/patch-1

fix(models/rest): unique key for form data item
This commit is contained in:
DjDeveloper 2021-01-28 21:58:29 +05:30 committed by GitHub
commit b4dd929a3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

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.forEach((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 = {}