Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Conditional “multiple” attribute in <input type=“file”> #7714

Closed
tonylampada opened this issue Jun 5, 2014 · 2 comments
Closed

Conditional “multiple” attribute in <input type=“file”> #7714

tonylampada opened this issue Jun 5, 2014 · 2 comments

Comments

@tonylampada
Copy link

I need an upload form field that may or may not allow the user to select more than one file.
I expected to be able to accomplish that with something as simple as:

<input type="file" ng-multiple="allow_multiple">

But that doesn't work.

I asked about it on stackoverflow but didn't get the solution I was looking for.
Are we missing a feature here?

@Narretz
Copy link
Contributor

Narretz commented Jul 7, 2014

Binding to multiple is currently not supported. It was forbidden because it caused issues with the select directive. Actually, input type="file" is also not supported, and probably won't be in angular 1.x, see #1375 (comment). So I am gonna close this issue. That said, there's nothing in core stopping you from implementing your own ng-multiple directive for type="file" or a complete upload directive. (There are also several 3rd party modules)

@Narretz Narretz closed this as completed Jul 7, 2014
@lrlopez
Copy link
Contributor

lrlopez commented Jul 7, 2014

@tonylampada, I don't have my desktop at reach, but could try using ng-attr-multiple='{{allow_multiple}}' instead?

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

No branches or pull requests

3 participants