Clay
10/03/2017, 4:36 PMfunction 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
"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?