add upload function of js
upload image works
fix local storage for image