added code for storing images on amazonS3