warndebug2
All checks were successful
deploy / deploy (push) Successful in 1m0s

This commit is contained in:
Untone 2024-10-22 20:50:06 +03:00
parent e9e0815af8
commit 525dcdd54d

View File

@ -60,8 +60,12 @@ pub async fn proxy_handler(
)
.await
{
Ok(true) => serve_file(thumb_filename, &state).await,
Ok(true) => {
warn!("serve existed thumb file: {}", thumb_filename);
serve_file(thumb_filename, &state).await
},
Ok(false) => {
warn!("generate new thumb files: {}", stored_path);
if let Ok(filedata) = load_file_from_s3(
&state.storj_client,
&state.bucket,
@ -69,6 +73,8 @@ pub async fn proxy_handler(
)
.await
{
warn!("original file loaded: {} bytes", filedata.len());
warn!("generate new thumb files");
thumbdata_save(
filedata.clone(),
&state,
@ -76,6 +82,7 @@ pub async fn proxy_handler(
content_type.to_string(),
)
.await;
warn!("serve new thumb file: {}", thumb_filename);
serve_file(thumb_filename, &state).await
} else {
Err(ErrorInternalServerError(