file_key-warn
All checks were successful
deploy / deploy (push) Successful in 1m3s

This commit is contained in:
Untone 2024-10-02 20:16:01 +03:00
parent 7a5832bf96
commit 74e1ab9bc6
2 changed files with 3 additions and 5 deletions

View File

@ -200,14 +200,11 @@ impl AppState {
self.save_path_by_filekey(filename, &key).await self.save_path_by_filekey(filename, &key).await
{ {
eprintln!( eprintln!(
"Ошибка сохранения ключа для файла {}: {:?}", "[ОШИБКА СОХРАНЕНИЯ] {}: {:?}",
filename_with_extension, e filename_with_extension, e
); );
} else { } else {
println!( println!("{}", filename_with_extension);
"Маппинг для файла {} успешно сохранен.",
filename_with_extension
);
} }
} }
Ok(true) => { Ok(true) => {

View File

@ -20,6 +20,7 @@ pub const MAX_WEEK_BYTES: u64 = 2 * 1024 * 1024 * 1024;
async fn serve_file(file_key: &str, state: &AppState) -> Result<HttpResponse, actix_web::Error> { async fn serve_file(file_key: &str, state: &AppState) -> Result<HttpResponse, actix_web::Error> {
// Проверяем наличие файла в Storj S3 // Проверяем наличие файла в Storj S3
if !check_file_exists(&state.s3_client, &state.s3_bucket, file_key).await? { if !check_file_exists(&state.s3_client, &state.s3_bucket, file_key).await? {
warn!("{}", file_key);
return Err(ErrorInternalServerError("File not found in S3")); return Err(ErrorInternalServerError("File not found in S3"));
} }