Documentation

s3_put

use aok::{Result, OK};
use s3_put::ByteStream;
use static_init::constructor;
use tracing::info;

#[constructor(0)]
extern "C" fn init() {
  loginit::init()
}

#[tokio::test]
async fn test() -> Result<()> {
  let dir = env!("CARGO_MANIFEST_DIR");
  let toml = format!("{dir}/Cargo.toml");
  info!("{}", toml);
  let mut s3 = s3_put::env_s3().await;
  s3.put("i18ntmp/toml", "text/js", || ByteStream::from_path(&toml))
    .await?;
  OK
}