logs
This commit is contained in:
parent
30f591a34e
commit
367484ccd7
|
@ -34,6 +34,7 @@ pub async fn proxy_handler(
|
||||||
"png" => "image/png",
|
"png" => "image/png",
|
||||||
"webp" => "image/webp",
|
"webp" => "image/webp",
|
||||||
"gif" => "image/gif",
|
"gif" => "image/gif",
|
||||||
|
"jfif" => "image/jpeg",
|
||||||
"mp3" => "audio/mpeg",
|
"mp3" => "audio/mpeg",
|
||||||
"wav" => "audio/x-wav",
|
"wav" => "audio/x-wav",
|
||||||
"ogg" => "audio/ogg",
|
"ogg" => "audio/ogg",
|
||||||
|
@ -139,6 +140,7 @@ pub async fn proxy_handler(
|
||||||
let filepath = format!("production/{}/{}.{}", ct_parts[0], base_filename, extension); // NOTE: original ext
|
let filepath = format!("production/{}/{}.{}", ct_parts[0], base_filename, extension); // NOTE: original ext
|
||||||
|
|
||||||
let exists_in_storj = check_file_exists(&state.storj_client, &state.bucket, &filepath).await?;
|
let exists_in_storj = check_file_exists(&state.storj_client, &state.bucket, &filepath).await?;
|
||||||
|
warn!("Checking existence in Storj: {}", exists_in_storj);
|
||||||
|
|
||||||
if exists_in_storj {
|
if exists_in_storj {
|
||||||
warn!("file {} exists in storj, try to generate thumbnails", filepath);
|
warn!("file {} exists in storj, try to generate thumbnails", filepath);
|
||||||
|
@ -157,6 +159,8 @@ pub async fn proxy_handler(
|
||||||
}
|
}
|
||||||
|
|
||||||
let exists_in_aws = check_file_exists(&state.aws_client, &state.bucket, &filepath).await?;
|
let exists_in_aws = check_file_exists(&state.aws_client, &state.bucket, &filepath).await?;
|
||||||
|
warn!("Checking existence in AWS: {}", exists_in_aws);
|
||||||
|
|
||||||
if exists_in_aws {
|
if exists_in_aws {
|
||||||
match load_file_from_s3(&state.aws_client, &state.bucket, &filepath).await {
|
match load_file_from_s3(&state.aws_client, &state.bucket, &filepath).await {
|
||||||
Ok(filedata) => {
|
Ok(filedata) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user