This commit is contained in:
parent
7a5832bf96
commit
74e1ab9bc6
|
@ -200,14 +200,11 @@ impl AppState {
|
|||
self.save_path_by_filekey(filename, &key).await
|
||||
{
|
||||
eprintln!(
|
||||
"Ошибка сохранения ключа для файла {}: {:?}",
|
||||
"[ОШИБКА СОХРАНЕНИЯ] {}: {:?}",
|
||||
filename_with_extension, e
|
||||
);
|
||||
} else {
|
||||
println!(
|
||||
"Маппинг для файла {} успешно сохранен.",
|
||||
filename_with_extension
|
||||
);
|
||||
println!("{}", filename_with_extension);
|
||||
}
|
||||
}
|
||||
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> {
|
||||
// Проверяем наличие файла в Storj S3
|
||||
if !check_file_exists(&state.s3_client, &state.s3_bucket, file_key).await? {
|
||||
warn!("{}", file_key);
|
||||
return Err(ErrorInternalServerError("File not found in S3"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user