iam suing the fetch example. my code so far ```get...
# random
p
iam suing the fetch example. my code so far
Copy code
getFile(event) {
      //  console.log(event.target.files[0])

      let data = new FormData()
      const endpoint = '<http://localhost:60000/simple/v1/cjgxei1ta00040149ajdwk6ek>'
      data.append('data', event.target.files[0])

      //  console.log('data', data.getAll('data'))

      fetch(endpoint, {
        method: 'POST',
        headers : {
          'Content-Type' : 'multipart/form-data',
          'Access-Control-Allow-Origin' : '*',
        },
        body: data
      }).then(response => {
      console.log('response', response)
      return response.json()
      }).then(file => {
        console.log('file res', file)
        const fileId = file.id
      }).catch(err => {
        console.log(err)
      })
    },