nova_multipart_memory_handler (nova v0.18.1)

View Source

nova_multipart_handler that keeps a file part in memory. Bounded by the plugin's max_part_size and max_total_size, so use it for small attachments only.

Result: #{body => Binary}.

Summary

Functions

handle_abort(Reason, Acc)

-spec handle_abort(Reason :: term(), Acc :: binary()) -> ok.

handle_data(Data, Acc)

-spec handle_data(Data :: binary(), Acc :: binary()) -> {ok, binary()}.

handle_end(Acc)

-spec handle_end(Acc :: binary()) -> {ok, #{body := binary()}}.

init(PartInfo, InitArgs)

-spec init(nova_multipart_handler:part_info(), InitArgs :: term()) -> {ok, binary()}.