Expand description
Static file serving for Actix Web.
Provides a non-blocking service for serving static files from disk.
§Examples
use actix_web::App;
use actix_files::Files;
let app = App::new()
.service(Files::new("/static", ".").prefer_utf8(true));
Re-exports§
pub use self::chunked::ChunkedReadFile;
Structs§
- Directory
- A directory; responds with the generated directory listing.
- Files
- Static files handling service.
- Files
Service - Assembled file serving service.
- Http
Range - HTTP Range header representation.
- Named
File - A file with an associated name.
Functions§
- file_
extension_ to_ mime - Return the MIME type associated with a filename extension (case-insensitive).
If
ext
is empty or no associated type for the extension was found, returns the typeapplication/octet-stream
.