How to upload a file to S3 without creating a temporary local file

前端 未结 10 1867
無奈伤痛
無奈伤痛 2021-01-30 13:49

Is there any feasible way to upload a file which is generated dynamically to amazon s3 directly without first create a local file and then upload to the s3 server? I use python.

10条回答
  •  你的背包
    2021-01-30 14:38

    You can try using smart_open (https://pypi.org/project/smart_open/). I used it exactly for that: writing files directly in S3.

提交回复
热议问题