pict-rs/src/validate/exiftool.rs

15 lines
370 B
Rust
Raw Normal View History

use actix_web::web::Bytes;
use crate::{
exiftool::ExifError,
process::{Process, ProcessRead},
};
2023-12-16 04:34:45 +00:00
#[tracing::instrument(level = "trace", skip_all)]
2023-08-05 17:41:06 +00:00
pub(crate) fn clear_metadata_bytes_read(
input: Bytes,
timeout: u64,
) -> Result<ProcessRead, ExifError> {
Ok(Process::run("exiftool", &["-all=", "-", "-out", "-"], &[], timeout)?.bytes_read(input))
}