refactor: rename ImageStorage → ObjectStorage
Some checks failed
CI / Check / Test (push) Failing after 46s
Some checks failed
CI / Check / Test (push) Failing after 46s
This commit is contained in:
@@ -13,7 +13,7 @@ pub async fn get_image(
|
||||
if key.starts_with("http://") || key.starts_with("https://") {
|
||||
return axum::response::Redirect::temporary(&key).into_response();
|
||||
}
|
||||
match state.app_ctx.services.image_storage.get(&key).await {
|
||||
match state.app_ctx.services.object_storage.get(&key).await {
|
||||
Ok(bytes) => {
|
||||
let mime = infer::get(&bytes)
|
||||
.map(|t| t.mime_type())
|
||||
|
||||
@@ -172,7 +172,7 @@ pub async fn get_video(State(state): State<AppState>, Path(id): Path<Uuid>) -> i
|
||||
match state
|
||||
.app_ctx
|
||||
.services
|
||||
.image_storage
|
||||
.object_storage
|
||||
.get_stream(&video_key)
|
||||
.await
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user