This commit is contained in:
Untone 2024-11-11 14:15:45 +03:00
parent bdda6b6341
commit dc23d7d066

View File

@ -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 {