axum-image-endpoint 0.1.1

Image Endpoint to upload big images and receive rescaled ones
Documentation
use std::path::PathBuf;

use crate::image_app_options::ImageAppOptions;

#[derive(Clone, Debug)]
pub struct ImageAppState {
    pub(crate) original_image_path: PathBuf,
    pub(crate) modified_image_path: PathBuf,
    pub(crate) image_route: String,
}

impl From<&ImageAppOptions> for ImageAppState {
    fn from(value: &ImageAppOptions) -> Self {
        ImageAppState {
            original_image_path: value.original_image_path(),
            modified_image_path: value.modified_image_path(),
            image_route: value.img_route.clone(),
        }
    }
}