more debug info

main
Cyryl Płotnicki 2023-02-25 11:22:47 +00:00
parent fa61988ee4
commit 502798a0cc
1 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ fn main() -> Result<()> {
.init()?;
let runtime = tokio::runtime::Builder::new_multi_thread()
.enable_all()
.max_blocking_threads(16)
.max_blocking_threads(2)
.max_io_events_per_tick(2)
.build()?;
runtime.block_on(async {
@ -131,11 +131,11 @@ async fn upload_file(
let file_name = path.file_name().unwrap_or_default().to_string();
let mime_type = mime_guess::from_path(&path).first_raw().unwrap_or_default();
let file_part = multipart::Part::stream(file_body)
.file_name(file_name)
.file_name(file_name.clone())
.mime_str(mime_type)?;
let form = multipart::Form::new().part("file", file_part);
log::debug!("about to upload {}...", path.to_string());
log::debug!("about to upload {} ... as {}", path.to_string(), &file_name);
Ok(Some(
http_client
.post(format!("{BASE_PATH}/upload"))