Added functions for uploading to Amazon S3