Skip to content

Commit

Permalink
fix(client): update image upload to alexchu
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed Dec 13, 2020
1 parent eb73a0c commit 4e7be34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/client/src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ export default function Context(props) {
},
uploadImage: typeof props.uploadImage === 'function' ? props.uploadImage : function(file) {
const formData = new FormData();
formData.append('file', file);
formData.append('image', file);

return fetch('https://imgkr.com/api/files/upload', {
return fetch('https://pic.alexhchu.com/api/upload', {
method: 'POST',
body: formData
}).then(resp => resp.json()).then(resp => resp.data);
}).then(resp => resp.json()).then(resp => resp.data.url);
}
};

Expand Down

0 comments on commit 4e7be34

Please sign in to comment.