Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const onSubmit = async data => {
- console.log(JSON.stringify(data));
- //console.log(files[0]);
- // Upload image
- const image = await uploadImage();
- // Save user (register)
- // const response = await registerForm({
- // ...data,
- // imageUrl: image.photo,
- // isCoach: false
- // token: ''
- // });
- };
- const onDrop = file => {
- if (!file.length) {
- return;
- }
- const formData = new FormData();
- formData.append('file', file[0]);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement