Adds function to upload image to s3 server.