We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i am trying to upload a image with my other text data to server. but text data is uploading but image never uploads. here is my code
const fileToUpload = selectedImage1; const data = new FormData(); data.append('image', 'Image Upload'); data.append('file_attachment', fileToUpload); fetch('URL', { method: 'POST', headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify({ first_name: textInputFname, last_name: textInputLname, email: textInputEmail, password: textInputPassword, phone: textInputPhone, address: textInputAddress, type: checked=='first'?1:2, company_name: textInputCoName, company_address: textInputCoAddress, company_tax_number: textInputCoTaxNum, extra_info: textInputExtraInfo, image: data }) }).then((response) => response.json())
The text was updated successfully, but these errors were encountered:
selectedImage1 is the image path that i selected from image picker.
Sorry, something went wrong.
No branches or pull requests
i am trying to upload a image with my other text data to server. but text data is uploading but image never uploads. here is my code
The text was updated successfully, but these errors were encountered: