Module z_fileuploader

Process buffering uploaded files till they are complete.

Copyright © 2021 Marc Worrell

Behaviours: gen_server.

Authors: Marc Worrell (marc@worrell.nl).

Description

Process buffering uploaded files till they are complete.

Function Index

exists/1Check if an uploader exists.
handle_call/3
handle_cast/2
handle_info/2
init/1
start_link/3Create a new process managing a file upload.
status/1Return the topics and status for the file upload.
stop/1Stop an uploader.
upload/3

Function Details

exists/1

exists(Name::binary() | undefined) -> boolean()

Check if an uploader exists

handle_call/3

handle_call(X1, From, State) -> any()

handle_cast/2

handle_cast(X1, State) -> any()

handle_info/2

handle_info(X1, State) -> any()

init/1

init(X1) -> any()

start_link/3

start_link(Filename::file:filename_all(), Size::pos_integer(), Context::z:context()) -> {ok, pid()} | {error, term()}

Create a new process managing a file upload.

status/1

status(Pid::pid() | binary()) -> {ok, map()} | {error, enoent}

Return the topics and status for the file upload.

stop/1

stop(Pid::pid() | binary()) -> ok | {error, enoent}

Stop an uploader.

upload/3

upload(Pid::pid() | binary(), Offset::non_neg_integer(), Data::binary()) -> {ok, map()} | {error, term()}


Generated by EDoc