If you are trying to upload with JSON data, I think you have to use FormData
let filePayload = new FormData(); filePayload.append('file', fileData);