How can I display ina images in actix-web?
This is how I'm trying
#[get("/showimg")]
async fn show_img() -> Result<HttpResponse> {
let img = std::path::PathBuf::from(
"./files/product/813310a0-46d1-473a-9355-e89e936d3dcd.jpg",
);
Ok(HttpResponse::Ok()
.content_type("image/jpeg")
.respose(img) <- pseudocodigo
;
}
I have looked for information and I have not found