Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. const onSubmit = async data => {
  2. console.log(JSON.stringify(data));
  3. //console.log(files[0]);
  4.  
  5. // Upload image
  6. const image = await uploadImage();
  7.  
  8. // Save user (register)
  9. // const response = await registerForm({
  10. // ...data,
  11. // imageUrl: image.photo,
  12. // isCoach: false
  13. // token: ''
  14. // });
  15. };
  16.  
  17. const onDrop = file => {
  18. if (!file.length) {
  19. return;
  20. }
  21.  
  22. const formData = new FormData();
  23. formData.append('file', file[0]);
  24. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement