This commit is contained in:
parent
6206a68697
commit
f671b76611
|
@ -137,9 +137,9 @@ pub async fn proxy_handler(
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Ok(None) => {
|
Ok(None) => {
|
||||||
warn!("cannot find stored path for: {}", requested_res);
|
warn!("cannot find stored path for: {}", filekey);
|
||||||
// download from aws to storj
|
// download from aws to storj
|
||||||
match load_file_from_s3(&state.aws_client, &state.bucket, &requested_res).await {
|
match load_file_from_s3(&state.aws_client, &state.bucket, &filekey).await {
|
||||||
Ok(filedata) => {
|
Ok(filedata) => {
|
||||||
thumbdata_save(filedata.clone(), &state, &filekey, content_type.to_string())
|
thumbdata_save(filedata.clone(), &state, &filekey, content_type.to_string())
|
||||||
.await;
|
.await;
|
||||||
|
@ -158,7 +158,7 @@ pub async fn proxy_handler(
|
||||||
Ok(HttpResponse::Ok().content_type(content_type).body(filedata))
|
Ok(HttpResponse::Ok().content_type(content_type).body(filedata))
|
||||||
},
|
},
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("cannot download {} from aws: {}", requested_res, e);
|
error!("cannot download {} from aws: {}", filekey, e);
|
||||||
Err(ErrorInternalServerError(e))
|
Err(ErrorInternalServerError(e))
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user