Function sharp_pencil::helpers::send_from_directory_range
source · [−]pub fn send_from_directory_range(
directory: &str,
filename: &str,
as_attachment: bool,
range: Option<&Range>
) -> PencilResult
Expand description
Send a file from a given directory with send_file
, supporting HTTP Range requests, so it allows only partial files
to be requested and sent. This doesn’t support multiranges at the moment. This is a secure way to
quickly expose static files from an folder. This will guess the mimetype
for you.