Skip to content
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

Unnecessary save pictures #10

Open
nnguyen52 opened this issue Oct 9, 2021 · 2 comments
Open

Unnecessary save pictures #10

nnguyen52 opened this issue Oct 9, 2021 · 2 comments

Comments

@nnguyen52
Copy link

When in creating product peocess. => if you choose an image file. It get instantly saved in cloudinary, which is not good because if admin may not want to create product anymore => the image still get saved to database. It should be creatting image as placehoder => when aubmit form create product=> save image to database

@devat-youtuber
Copy link
Owner

If people get image upload error, quit axios and use fetch:

const res = await fetch('/api/upload', {
method: "POST",
body: formData,
headers: {
Authorization: token
}
})

@Altamash2002
Copy link

fetch is also not working
I am getting this error
Proxy error: Could not proxy request /api/upload from localhost:3000 to http://localhost:5000/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants