Image transformation
This commit is contained in:
@@ -24,10 +24,17 @@ tokio-stream = { workspace = true }
|
||||
|
||||
serde = { workspace = true, optional = true }
|
||||
axum = { workspace = true, optional = true }
|
||||
percent-encoding = { workspace = true, optional = true }
|
||||
utoipa = { workspace = true, optional = true }
|
||||
utoipa-swagger-ui = { workspace = true, optional = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
pdfium = ["pile-value/pdfium"]
|
||||
axum = ["dep:axum", "dep:utoipa", "dep:utoipa-swagger-ui", "dep:serde"]
|
||||
axum = [
|
||||
"dep:axum",
|
||||
"dep:utoipa",
|
||||
"dep:utoipa-swagger-ui",
|
||||
"dep:serde",
|
||||
"dep:percent-encoding",
|
||||
]
|
||||
|
||||
@@ -4,6 +4,7 @@ use axum::{
|
||||
http::{StatusCode, header},
|
||||
response::{IntoResponse, Response},
|
||||
};
|
||||
use percent_encoding::percent_decode_str;
|
||||
use pile_config::{Label, objectpath::ObjectPath};
|
||||
use pile_value::{extract::traits::ExtractState, value::PileValue};
|
||||
use serde::Deserialize;
|
||||
@@ -61,6 +62,7 @@ pub async fn get_extract(
|
||||
if let Some((k, v)) = part.split_once('=')
|
||||
&& k == "path"
|
||||
{
|
||||
let v = percent_decode_str(v).decode_utf8_lossy();
|
||||
match v.parse::<ObjectPath>() {
|
||||
Ok(p) => result.push(p),
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user