[−][src]Module sharp_pencil::helpers
This module implements various helpers.
Traits
PathBound | Path bound trait. |
Functions
abort | One helper function that can be used to return HTTP Error inside a view function. |
escape | Replace special characters "&", "<", ">" and (") to HTML-safe characters. |
redirect | Returns a response that redirects the client to the target location. |
safe_join | Safely join directory and filename, otherwise this returns None. |
send_file | Sends the contents of a file to the client. Please never pass filenames to this
function from user sources without checking them first. Set |
send_file_range | Sends the contents of a file to the client, supporting HTTP Range requests, so it allows only partial files
to be requested and sent. This doesn't support multiranges at the moment.
Please never pass filenames to this
function from user sources without checking them first. Set |
send_from_directory | Send a file from a given directory with |
send_from_directory_range | Send a file from a given directory with |