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

View file

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