Getting error "Backendless.XMLHttpRequest is not a constructor" when running Business Logic

Hi Sean

As workaround I can propose you this one:


const directoryPath = 'my-directory/and-sub-directory'
const fileName = 'my-cool-file.txt'
const data = ['hello', 'there']
const content = JSON.stringify(data)


return Backendless.Request
  .put(`${Backendless.appPath}/files/binary/${directoryPath}/${fileName}?overwrite=true`)
  .set({ 'Content-Type': 'text/plain' })
  .send(Buffer.from(content).toString('base64'))

http://support.backendless.com/public/attachments/1c76bf3dba4e58d045ba749f260acf6a.png</img>

Regards, Vlad