From a8936c92d3c788d7dcf9a5f76ecd0d4ea69790cc Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 23 Oct 2024 16:30:35 +0300 Subject: [PATCH] filepath --- src/handlers/proxy.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/handlers/proxy.rs b/src/handlers/proxy.rs index 2bfca87..9e39110 100644 --- a/src/handlers/proxy.rs +++ b/src/handlers/proxy.rs @@ -138,8 +138,9 @@ pub async fn proxy_handler( } Ok(None) => { warn!("cannot find stored path for: {}", filekey); + let filepath = format!("unsafe/production/{}", filekey); // download from aws to storj - match load_file_from_s3(&state.aws_client, &state.bucket, &filekey).await { + match load_file_from_s3(&state.aws_client, &state.bucket, &filepath).await { Ok(filedata) => { thumbdata_save(filedata.clone(), &state, &filekey, content_type.to_string()) .await; @@ -158,7 +159,7 @@ pub async fn proxy_handler( Ok(HttpResponse::Ok().content_type(content_type).body(filedata)) }, Err(e) => { - error!("cannot download {} from aws: {}", filekey, e); + error!("cannot download {} from aws: {}", filepath, e); Err(ErrorInternalServerError(e)) }, }