Image transformation
Some checks failed
CI / Typos (push) Successful in 20s
CI / Build and test (push) Failing after 2m41s
CI / Clippy (push) Successful in 3m23s
CI / Build and test (all features) (push) Failing after 10m11s
Docker / build-and-push (push) Failing after 1m1s

This commit is contained in:
2026-03-26 11:52:00 -07:00
parent 599c38ac26
commit ec7326a55e
13 changed files with 543 additions and 20 deletions

View File

@@ -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",
]

View File

@@ -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) => {