diff --git a/src/handlers/proxy.rs b/src/handlers/proxy.rs index 7ca9c7e..465a3cc 100644 --- a/src/handlers/proxy.rs +++ b/src/handlers/proxy.rs @@ -111,10 +111,14 @@ pub async fn proxy_handler( } } else { warn!("Attempting to load from AWS - bucket: {}, path: {}", state.bucket, stored_path); - + + // Определяем тип медиа из content_type + let media_type = content_type.split("/").next().unwrap_or("image"); + let aws_paths = vec![ stored_path.clone(), - format!("production/{}", stored_path) + format!("production/{}", stored_path), + format!("production/{}/{}", media_type, stored_path) ]; for path in aws_paths {