access_type() = direct | archive
bin_content_path() = us_web_handler:bin_content_path()
extra() = [extra_charset() | extra_etag() | extra_mimetypes()]
extra_charset() = {charset, module(), function()} | {charset, binary()}
extra_etag() = {etag, module(), function()} | {etag, false}
extra_mimetypes() = {mimetypes, module(), function()} | {mimetypes, binary() | {binary(), binary(), [{binary(), binary()}]}}
file_info() = file_utils:file_info()
handler_return() = us_web_handler:handler_return()
handler_state() = us_web_handler:handler_state()
opts() = {file | dir, ustring() | binary()} | {file | dir, ustring() | binary(), extra()} | {priv_file | priv_dir, atom(), ustring() | binary()} | {priv_file | priv_dir, atom(), ustring() | binary(), extra()}
rest_handler_state() = {bin_content_path(), {access_type(), file_info()} | basic_utils:error_term(), extra()}
ustring() = text_utils:ustring()
charsets_provided/2 | |
content_types_provided/2 | |
forbidden/2 | |
generate_etag/2 | |
get_file/2 | |
init/2 | |
last_modified/2 | |
malformed_request/2 | |
ranges_provided/2 | |
resource_exists/2 |
content_types_provided(Req, State) -> {[{binary(), get_file}], Req, State}
State = rest_handler_state()
get_file(Req::cowboy_req:req(), HState::rest_handler_state()) -> {{sendfile, 0, non_neg_integer(), binary()}, cowboy_req:req(), rest_handler_state()}
init(Req::cowboy_req:req(), HState::handler_state()) -> handler_return()
last_modified(Req::cowboy_req:req(), HState::rest_handler_state()) -> {calendar:datetime(), cowboy_req:req(), rest_handler_state()}
malformed_request(Req, State) -> {boolean(), Req, State}
Generated by EDoc