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

Two different file upload on the same controller #389

Closed
JeffGreat opened this issue Nov 5, 2014 · 4 comments
Closed

Two different file upload on the same controller #389

JeffGreat opened this issue Nov 5, 2014 · 4 comments

Comments

@JeffGreat
Copy link

When using the directive twice on a page with two different upload method it doesn't work. for instance the first directive calls uploadPicture($files) and the second one uploadDocument($files).
Actually angular-file-upload only consider the second method for both directive element. This is due to directive scope which is global.
To avoid this behaviour directive must have the "scope : true" parameter. I'll post a pull request.

@JeffGreat
Copy link
Author

#390

@danialfarid
Copy link
Owner

fixed in version 2.0.0

@danialfarid
Copy link
Owner

Actually going through the old version prior to 2.x. this behaviour doesn't happen and I can have two different methods for ng-file-select for two elements in the same controller and they call the correct method.
Could you create a jsfiddle with version 1.x to show what you were referring to here.
It seems unnecessary to have an isolated scope for this directive.

@JeffGreat
Copy link
Author

Ok, i'll try to check that asap

danialfarid pushed a commit that referenced this issue Jan 6, 2015
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

2 participants