vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Function parseMultiPartForm

Parses a form in "multipart/form-data" format.

void parseMultiPartForm(InputStream) (
  ref FormFields fields,
  ref FilePartFormFields files,
  string content_type,
  InputStream body_reader,
  size_t max_line_length
)
if (isInputStream!InputStream);

If any files are contained in the form, they are written to temporary files using createTempFile and their details returned in the files field.

Parameters

NameDescription
fields The key-value map to which form fields must be written
files The FileParts mapped to the corresponding key in which details on transmitted files will be written to.
content_type The value of the Content-Type HTTP header.
body_reader A valid InputSteram data stream consumed by the parser.
max_line_length The byte-sized maximum length of lines used as boundary delimitors in Multi-Part forms.
Authors

Sönke Ludwig, Jan Krüger

Copyright

© 2012-2014 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.