This commit is contained in:
parent
7fc29f6b7e
commit
9b2fa3ac6b
|
@ -92,6 +92,7 @@ pub async fn proxy_handler(
|
|||
warn!("serve new thumb file: {}", thumb_filename);
|
||||
serve_file(thumb_filename, &state).await
|
||||
} else {
|
||||
error!("cannot generate thumbnail");
|
||||
Err(ErrorInternalServerError(
|
||||
"cannot generate thumbnail",
|
||||
))
|
||||
|
@ -121,7 +122,7 @@ pub async fn proxy_handler(
|
|||
content_type,
|
||||
)
|
||||
.await {
|
||||
warn!("cannot upload to storj: {}", e);
|
||||
error!("cannot upload to storj: {}", e);
|
||||
} else {
|
||||
warn!("file {} uploaded to storj", filekey);
|
||||
}
|
||||
|
@ -139,7 +140,7 @@ pub async fn proxy_handler(
|
|||
Ok(None) => {
|
||||
warn!("cannot find stored path for: {}", filekey);
|
||||
let ct_parts = content_type.split("/").collect::<Vec<&str>>();
|
||||
let filepath = format!("production/{}/{}", ct_parts[0], filekey);
|
||||
let filepath = format!("production/{}/{}.{}", ct_parts[0], base_filename, extension); // NOTE: original ext
|
||||
|
||||
match check_file_exists(&state.storj_client, &state.bucket, &filepath).await? {
|
||||
true => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user