deployer_3.py 347 B

12345
  1. def upload_file(source, bucket, key, s3lib, acl, cacheControl, contentType):
  2. print('uploading from {} {} {}'.format(source, bucket, key))
  3. contentType = contentType or defaultContentType
  4. s3lib.Object(bucket, key).put(ACL=acl, Body=open(source, 'rb'),
  5. CacheControl=cacheControl, ContentType=contentType)