Depends on your minimum browser requirements. It is quite easy to do with HTML 5 File API - see for example https://egghead.io/lessons/angularjs-file-uploads and to get nice styling: http://gregpike.net/demos/bootstrap-file-input/demo.html
For older browsers you are basically out of luck: For that case the server API must be able handle a regular form upload. Also the usual trick to avoid a page reload is to specify an iframe as the target, have the server reply with json content, but html mime type and parse the result from the iframe. There sure is existing code than you can use for that, too. On Thursday, June 12, 2014 8:32:10 AM UTC+2, raja bhaskar wrote: > > I am new at developing API centric web applications with AngularJS. We are > going to use AngularJS as frontend framework. We have a upload > functionality in the application. I want to upload an image/document using > AngularJS and convert the uploaded image into byte code, then send the byte > code to the API service. How can we create bytecode using AngularJS? Please > guide me if you have any idea. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
