fix: remove stray space in upload filename format string

This commit is contained in:
xfy 2026-06-09 13:37:11 +08:00
parent 44c1358da5
commit 281da208f5

View File

@ -189,4 +189,16 @@ pub async fn upload_image(
}))) })))
} }
#[cfg(test)]
mod tests {
#[test]
fn filename_format_no_spaces() {
let now_str = "120000";
let uuid = "abc-123";
let ext = "jpg";
let file_name = format!("{}.{}.{}", now_str, uuid, ext);
assert!(!file_name.contains(' '), "filename should not contain spaces: got '{}'", file_name);
}
}