Exemple #1
0
def s3_upload(bucket_name, local_filename, s3_filename):
    conn = boto.connect_s3()
    bucket = boto.s3.bucket.Bucket(conn, bucket_name)
    key = boto.s3.key.Key(bucket)
    key.key = s3_filename
    key.set_contents_from_filename(local_filename)
    key.make_public()
Exemple #2
0
def upload_release(target_file, s3_key):
    conn = boto.s3.connection.S3Connection(
        env.aws_access_key, env.aws_secret_key, proxy=env.http_proxy, proxy_port=env.http_proxy_port
    )
    bucket = conn.get_bucket(env.s3_bucket)
    key = boto.s3.key.Key(bucket)
    key.key = s3_key
    key.set_contents_from_filename(target_file)
    key.make_public()
    print("Uploaded release as public to http://s3.amazonaws.com/%s/%s" % (bucket.name, s3_key))
def upload_release(target_file, s3_key):
    conn = boto.s3.connection.S3Connection(env.aws_access_key,
            env.aws_secret_key, proxy=env.http_proxy,
            proxy_port=env.http_proxy_port)
    bucket = conn.get_bucket(env.s3_bucket)
    key = boto.s3.key.Key(bucket)
    key.key = s3_key
    key.set_contents_from_filename(target_file)
    key.make_public()
    print ("Uploaded release as public to http://s3.amazonaws.com/%s/%s" %
            (bucket.name, s3_key))