z_multipart_parse (zotonic_core v1.0.0-rc.14)

Parse multipart/form-data request bodies. Uses a callback function to receive the next parts, can call a progress function to report back the progress on receiving the data.

Adapted from mochiweb_multipart.erl, integrated with webmachine and zotonic

Link to this section Summary

Functions

Find the next boundary in the data
Receive and parse the form data in the request body. The progress function should accept the parameters [Percentage, Context]

Link to this section Functions

Link to this function

find_boundary(Prefix, Data)

Find the next boundary in the data
Link to this function

recv_parse(Context)

-spec recv_parse(z:context()) -> {#multipart_form{}, z:context()}.
Receive and parse the form data in the request body. The progress function should accept the parameters [Percentage, Context]