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

Add input:file support (feature request for 1.3) #5503

Closed
alonisser opened this issue Dec 21, 2013 · 3 comments
Closed

Add input:file support (feature request for 1.3) #5503

alonisser opened this issue Dec 21, 2013 · 3 comments

Comments

@alonisser
Copy link

that would be great and much needed

@alonisser
Copy link
Author

Basically it should allow

  1. built in validation (has a file been uploaded?, what kind of file?)
  2. Modern Ajax file upload
    3.. drag and drop would be nice to have

lots of the functionality (but not all of it) can be currently supplied by Danial farid: angular-file-upload but native (out of the box) support would be nice

@wesleycho
Copy link
Contributor

This has come up from time to time, but there are some difficult aspects with inputs with type file. For one, HTML5 spec prevents you from modifying the file attached to the input via javascript, so any ng-model implementation (if that is the route taken) could only be a one way binding.

File uploading with Angular is easy enough with $http, although currently there is no way to hook into the xhr progress event. #2725 brings $q.notify into the fold for creating a mechanism for using an event, but finding a good way to implement this in Angular itself is not immediately obvious to me (the implementation should lie in httpBackend.js though).

As for dragging and dropping, I'm not sure whether anything more should be added into the Angular core for handling that. It isn't a particularly hard thing to implement if you create directives for the drop event.

@ghost ghost assigned IgorMinar Dec 28, 2013
@IgorMinar
Copy link
Contributor

duplicate of #1236 and #1375

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

No branches or pull requests

3 participants