Nacim Idjakirene
Nacim Idjakirene

Reputation: 1931

how to upload images with Angular js ? or how to use / simulate ng-model in input type file?

I have a form wich contain name, email... and user's image for a web app registration, i send data via a rest api with $http in a objet called userData, how ca i add to this objet the file / image ? how to use angular model or bind the file to a scope variable ?

Thanx in advance.

Upvotes: 0

Views: 307

Answers (1)

Fredrik Holm
Fredrik Holm

Reputation: 166

I use ng-file-upload: https://github.com/danialfarid/ng-file-upload

It works well with images and supports uploading by drag and drop, multiple files etc.

Upvotes: 1

Related Questions