Skip to content

Commit

Permalink
Print the number of bytes fetched after a file is successfully downlo…
Browse files Browse the repository at this point in the history
…aded.
  • Loading branch information
lilith committed Oct 30, 2024
1 parent 0bd1f69 commit 0a4f30a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions imageflow_core/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,13 @@ impl ChecksumCtx{
if dest_path.exists() {
println!("{} (trusted) exists", checksum);
}else{
println!("Fetching {} to {:?}", &source_url, &dest_path);
print!("Fetching {} to {:?}...", &source_url, &dest_path);
let bytes = ::imageflow_http_helpers::fetch_bytes(&source_url).expect("Did you forget to upload {} to s3?");
File::create(&dest_path).unwrap().write_all(bytes.as_ref()).unwrap();
let mut f = File::create(&dest_path).unwrap();
f.write_all(bytes.as_ref()).unwrap();
f.flush().unwrap();

println!("{} bytes written successfully.", bytes.len());
}
}

Expand Down

0 comments on commit 0a4f30a

Please sign in to comment.