Fulfill the upload image function.