diff --git a/cooked/src/routes.rs b/cooked/src/routes.rs index 0df08e3..c5fe684 100644 --- a/cooked/src/routes.rs +++ b/cooked/src/routes.rs @@ -1,6 +1,7 @@ use crate::actors::search::{Find, Search}; use crate::types::*; use crate::{entities, entities::prelude::*, filters}; +use actix_files::Files; use actix_identity::Identity; use actix_multipart::form::{tempfile::TempFile, MultipartForm}; use actix_web::http::header::{CONTENT_LENGTH, CONTENT_TYPE}; @@ -505,5 +506,7 @@ pub fn configure(config: &mut actix_web::web::ServiceConfig) { .service(search_page) .service(search_results) .service(recipe_form) - .service(create_recipe); + .service(create_recipe) + .service(recipe_image_upload) + .service(Files::new("/assets", "./assets")); } diff --git a/cooked/templates/recipies/create_form.jinja b/cooked/templates/recipies/create_form.jinja index de8d3e6..19a303a 100644 --- a/cooked/templates/recipies/create_form.jinja +++ b/cooked/templates/recipies/create_form.jinja @@ -15,7 +15,7 @@
@@ -97,4 +97,17 @@
+ {% endblock %}