added the functionality for uploading the image.