-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
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
Getting 'Product thumbnail image is required' alert when I try to update an existing product. #44
Comments
I think, After changing const onSubmitForm = (form) => {
if (imageFile.image.file || product.imageUrl) { // old
if (imageFile.image.file || product.image) { // new
onSubmit({
...form,
quantity: 1,
// due to firebase function billing policy, let's add lowercase version
// of name here instead in firebase functions
name_lower: form.name.toLowerCase(),
dateAdded: new Date().getTime(),
image: imageFile?.image?.file || product.imageUrl, // old
image: imageFile?.image?.file || product.image, // new
imageCollection: imageFile.imageCollection
});
} else {
// eslint-disable-next-line no-alert
alert('Product thumbnail image is required.');
}
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Julius,
First of all, thanks alot for this wonderful e-commerce app and making it available to community for free.. :-)
Now to the issue.
From admin view, when I try to edit a product and submit the changes, I always get this message 'Product thumbnail image is required.'
I can see the thumbnail is loaded in the edit view, but somehow submit doesnt work without reuploading the thumbnail using 'choose image' button.
This is not as we may not be having the thumbnail copy of the product image all the time.
The text was updated successfully, but these errors were encountered: