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

Just a quick reminder. #6

Open
mysr3809 opened this issue Jan 9, 2024 · 0 comments
Open

Just a quick reminder. #6

mysr3809 opened this issue Jan 9, 2024 · 0 comments

Comments

@mysr3809
Copy link

mysr3809 commented Jan 9, 2024

After upload an image then if we have an error, we do not set false setFileUploadError value so when i try to upload new image i saw the error always. To fix that we should set setFileUploadError value to the false and the process can start from the beginning.

I appreciate for your effort @sahandghavidel

`
const handleFileUpload = (file) => {

setFileUploadError(false);

const storage = getStorage(app);

const fileName = new Date().getTime() + file.name;

const storageRef = ref(storage, fileName);

const uploadTask = uploadBytesResumable(storageRef, file);`
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

1 participant