update the upload sample image function