add upload image and fix some bug.