Implemented s3 uploading

This commit is contained in:
Jori Lallo
2016-05-19 23:51:22 -07:00
parent a101c8cdcb
commit 99a59ceb94
4 changed files with 78 additions and 3 deletions

View File

@@ -53,12 +53,13 @@ class MarkdownAtlas extends React.Component {
}
editor.setCursor(newCursorPositionLine, 0);
client.post('/v0/user/s3', {
client.post('/user.s3Upload', {
kind: file.type,
size: file.size,
filename: file.name,
})
.then(data => {
.then(response => {
const data = response.data;
// Upload using FormData API
let formData = new FormData();