How to save a file downloaded from S3 with Rusoto to my hard drive?

你离开我真会死。 提交于 2019-12-01 22:48:56

You're almost there. Your code will put the object in body, which is a Vec<u8>.

To write the contents of body to a file:

use std::io::Write;
use std::fs::File;

let mut file = File::create("/path/to/my-object").expect("create failed");
file.write_all(&body).expect("failed to write body");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!