Add file upload log in happy path and update log level for duplicate path
This commit is contained in:
@@ -163,8 +163,10 @@ async fn upload_image(
|
||||
true,
|
||||
) {
|
||||
if !full_path.is_file() && is_image_or_video(&full_path) {
|
||||
let mut file = File::create(full_path).unwrap();
|
||||
let mut file = File::create(&full_path).unwrap();
|
||||
file.write_all(&file_content).unwrap();
|
||||
|
||||
info!("Uploaded: {:?}", full_path);
|
||||
} else {
|
||||
warn!("File already exists: {:?}", full_path);
|
||||
|
||||
@@ -415,7 +417,7 @@ fn create_thumbnails() {
|
||||
let thumb_path = Path::new(thumbnail_directory).join(relative_path);
|
||||
std::fs::create_dir_all(thumb_path.parent().unwrap())
|
||||
.expect("There was an issue creating directory");
|
||||
debug!("Saving thumbnail: {:?}", thumb_path);
|
||||
info!("Saving thumbnail: {:?}", thumb_path);
|
||||
image.save(thumb_path).expect("Failure saving thumbnail");
|
||||
})
|
||||
.for_each(drop);
|
||||
|
||||
Reference in New Issue
Block a user