2023-07-13 03:12:21 +00:00
|
|
|
use actix_web::web::Bytes;
|
|
|
|
use tokio::io::AsyncRead;
|
|
|
|
|
|
|
|
use crate::{exiftool::ExifError, process::Process};
|
|
|
|
|
|
|
|
#[tracing::instrument(level = "trace", skip(input))]
|
2023-08-05 17:41:06 +00:00
|
|
|
pub(crate) fn clear_metadata_bytes_read(
|
|
|
|
input: Bytes,
|
|
|
|
timeout: u64,
|
|
|
|
) -> Result<impl AsyncRead + Unpin, ExifError> {
|
|
|
|
let process = Process::run("exiftool", &["-all=", "-", "-out", "-"], timeout)?;
|
2023-07-13 03:12:21 +00:00
|
|
|
|
|
|
|
Ok(process.bytes_read(input))
|
|
|
|
}
|