I use boto's send_file to upload file to ams-s3, it return 400 Bad Request but the body is empty, so I can't find the error code
here is the code
s3_conn = boto.connect_s3(aws_config.access_key, aws_config.secret_key)
bucket = s3_conn.get_bucket('bucketname')
k=Key(bucket)
k.key='somekey'
k.send_file(open('somefile'))
response
boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request
// these is no error code
if I change code
s3_conn = boto.connect_s3(aws_config.access_key, aws_config.secret_key)
bucket = s3_conn.get_bucket('bucketname')
k=Key(bucket)
k.key='somekey'
#k.send_file(open('somefile'))
k.set_contents_from_string(open('somefile').read())
everything is right