react-firebase-file-uploader
react-firebase-file-uploader copied to clipboard
Clear input value
Looking for a way to clear the value of the wrapped input element. I'm accessing the instance of the uploader (as seen here), but can't figure out how to clear the input.
ref={instance => { this.fileUploader = instance; } }
The reason I want this is that want to delete the file reference in my state store. This works fine if the next image uploaded is a different image, but because the input is still holding the old image, when you try to upload the same image it doesn't do anything.
Any solution?
Looking for a way to do this too. Once the upload is successful, the input should reset and clear the filename. I haven't been able to find a way. Tried with useRef using reset() and clear() and nothing is working.
Maybe the uploader needs an input value prop? Then you could clear it easily on success.
up up