finish uploading image and add to database part