Skip to content

Instantly share code, notes, and snippets.

@dceddia dceddia/App.js
Created Jun 15, 2018

Embed
What would you like to do?
Upload pictures to the server
uploadPicture = () => {
return fetch(SERVER_URL, {
body: JSON.stringify({
image: this.state.photo.base64
}),
headers: {
'content-type': 'application/json'
},
method: 'POST'
})
.then(response => response.json())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.