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

Issues with uploading the same file(s) multiple times #372

Closed
geoffreak opened this issue Oct 24, 2014 · 4 comments
Closed

Issues with uploading the same file(s) multiple times #372

geoffreak opened this issue Oct 24, 2014 · 4 comments

Comments

@geoffreak
Copy link

This is a great plugin and everything is working flawlessly for me except one major pain point. It seems that if the files that get selected match that of the last selection, the callback will not get fired. This is happening in every browser I tested in (all versions of IE from 8-11, latest Chrome, latest Firefox, latest Safari)

Steps to replicate:

  1. Add to HTML: (enabling multiple selection will make no difference)

    ng-file-select="upload($files)"
    
  2. Add to controller:

    $scope.upload = function($files) {
     console.log('upload!');
    }
    
  3. Select any file(s) via uploader

  4. See upload! in console

  5. Select exact same file(s) via uploader

  6. Nothing happens

As long as the selection isn't identical to that of the previous selection, the callback will get fired, but if it matches exactly it will silently fail with no possible way of catching.

Has anyone else run into the same issue? The only workaround I've found other than reloading the page is to re-render the HTML.

@danialfarid
Copy link
Owner

See this: #141 (comment)
add onclick to your input.

@geoffreak
Copy link
Author

Thanks for the fast response. onclick="this.value=null" fixes the issue (surprisingly even on button triggers)

@KD25
Copy link

KD25 commented Nov 19, 2015

Hi danialfarid

onclick="this.value=null" is not working with safari. Please let me know your suggestion on this.

Thanks.

@rajguru827
Copy link

In windows safari it not working

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

4 participants