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

Single file upload doesn't update if picking the same file again #1214

Open
thomashardwick opened this issue May 23, 2022 · 0 comments
Open

Comments

@thomashardwick
Copy link

If using ng2FileSelect but only uploading a single file (i.e.multiple attribute on the input element). If you pick a file, edit it and pick it again then the file is still referring to the old version. This then causes the upload to fail.

This is because the input does not fire it's change event because it is still the same file. It seems this was handled but only when the multiple attribute is present.
My solution has been to add (onFileSelected)="upload.value = ''" to the input element.

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