First argument to upload_file should be string
, but in your case it is some object obj
.
So, to upload /tmp/testnote.pdf
to my-bucket
it should be (you also need to modify key
):
s3_resource.Bucket('my-bucket').upload_file('/tmp/testnote.pdf', 'test-large-file-transfer-target/testnote.pdf')
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…