import form, field, file from dw::module::Multipart
import assert from dw::core::Assertions

var out = form([
            field('theFile', in0, 'application/zip', 'file.zip')
          ])

var rawMultipart =  write(out, 'multipart/form-data')
var readMultipart =  read(rawMultipart, 'multipart/form-data')


var validations = [
  assert(readMultipart.parts.theFile.content?, "It must have content"),
  assert(readMultipart.parts.theFile.content is Binary, "Content must be Binary"),
  assert(readMultipart.parts.theFile.content == in0, "Content equals in0")
]

---
readMultipart