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

Custom function to extend rejected files #576

Closed
Spin1987 opened this issue Feb 20, 2015 · 2 comments
Closed

Custom function to extend rejected files #576

Spin1987 opened this issue Feb 20, 2015 · 2 comments

Comments

@Spin1987
Copy link

Thanks for your awesome file upload.
What about a custom function to extend the rejected file upload logic?

I can define "accept" to whitelist file extensions, thats pretty nice. But i cant add a check for files with 0 size. I can do it by my self, but then i have all the 'invalid' files in my files array not in my rejected files array.

 $scope.handleFileSelected = function ($files, $rejectedFiles) {
      if ($files && $files.length > 0) {
       // i would like to do this in a fn which add all files in the rejected files.
        var filesWithZeroSize = getFilesWithZeroSize($files);
       }
    }

Thank you very much :)

@danialfarid
Copy link
Owner

good idea, gonna add it to the next release

@danialfarid
Copy link
Owner

Added in version 3.1.0

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

No branches or pull requests

2 participants