finish the upload picture functure