run the upload image function