upload image v2

with javascript, have to change it to angular version