mirror of https://git.asonix.dog/asonix/pict-rs
13 lines
409 B
Rust
13 lines
409 B
Rust
|
use actix_web::web::Bytes;
|
||
|
use tokio::io::AsyncRead;
|
||
|
|
||
|
use crate::{exiftool::ExifError, process::Process};
|
||
|
|
||
|
#[tracing::instrument(level = "trace", skip(input))]
|
||
|
pub(crate) fn clear_metadata_bytes_read(input: Bytes) -> Result<impl AsyncRead + Unpin, ExifError> {
|
||
|
let process =
|
||
|
Process::run("exiftool", &["-all=", "-", "-out", "-"]).map_err(ExifError::Process)?;
|
||
|
|
||
|
Ok(process.bytes_read(input))
|
||
|
}
|