Hi I’ve been trying to upload picture I downloaded...
# prisma-whats-new
c
Hi I’ve been trying to upload picture I downloaded from Facebook in the schema extension for couple days without success now 😢
Copy code
function uploadProfilePicToGraphCool(picture) {
    var data = new FormData()
    data.append('data', picture)
    return fetch('<https://api.graph.cool/file/v1/<ENDPOINT>>', {
      method: 'POST',
      body: data
    }).then((response) => {
      return response.json()
    }).then((image) => {
      return image
    })
  }
I’m currently getting
status\":500,\"statusText\":\"Internal Server Error
and
Copy code
"FetchError\",\"message\":\"invalid json response body at <https://api.graph.cool/file/v1/cj3qwr1jgbx060113fkcpa7tq> reason: Unexpected end of input\",\"type\":\"invalid-json\"}
Does anyone know what could have possibly gone wrong?