fix: don't encode attachment upload file blob as json

This commit is contained in:
kolaente 2022-09-06 13:02:49 +02:00
parent e95904351f
commit d819b9b0ba
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -52,7 +52,7 @@ export default class AttachmentService extends AbstractService<AttachmentModel>
const data = new FormData() const data = new FormData()
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
// TODO: Validation of file size // TODO: Validation of file size
data.append('files', new Blob([JSON.stringify(files[i], null, 2)]), files[i].name) data.append('files', new Blob([files[i]]), files[i].name)
} }
return this.uploadFormData( return this.uploadFormData(