How can I upload files using angularjs? I need to upload .xls files so need an extension check and also need to read
the data and display it in a table before posting it to PHP server.
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
|||||||||||||
|
Angular is a client side framework so a file upload is not going to be anything out of the ordinary. At the DOM level it will just use an HTML form with the file input field. The Angular way would be to write a directive that wraps the upload form. Angular isn't going to give you anything special for actually saving the file anywhere. Implement something in the backend to receive the file being uploaded. This is such a common requirement that I am sure there is an example out there for whatever language you are using. There are a couple of directives already written. For example, I used this on a recent project. |
||||
|