Image upload solved.

Still don't understand it completely. Need more Angularjs knowledge.