This commit is contained in:
parent
7a5832bf96
commit
74e1ab9bc6
|
@ -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) => {
|
||||||
|
|
|
@ -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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user