`cy.fixture("../downloads/xxx.csv").then(dailyFile...
# help
a
Copy code
cy.fixture("../downloads/xxx.csv").then(dailyFile => {
      cy.request({
        method: "POST",
        url: 'https://slack.com/api/files.upload',
        FormData: true,
        headers: {
          'Content-Type': 'multipart/form-data;charset=UTF-8',
          'Accept': '*/*',
          'Connection': 'keep-alive',
          'Accept-Encoding': '*'
        },
        body: {
          file: dailyFile,
          initial_comment: "Shakes the cat",
          channels: "xxx",
          token: "xxx",
        }
      })
    })
Hi all, i want to upload the downloaded file .csv in /downloads/ folder of cypress, but when i use this code, the api returned the invalid_form_data error, please help me.