def form.split.file

emerging-ezhttp@0.21.0.0 · src/form.bend:281

import emerging-ezhttp@0.21.0.0/src/form.bend as Form
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

281# a file part once its bytes are searched: the part the plan sees, onto the
282# rest, and its bytes kept in order
283def form.split.file(name: String, filename: String, ctype: String,
284  r: Bytes.Bytes & Bool, rest: List<&2, Part> & List<&1, Bytes.Bytes>)
285  -> List<&2, Part> & List<&1, Bytes.Bytes>:
286  (bs, hit) = r
287  (ps, fs) = rest
288  (File{name, filename, ctype, hit} <> ps, bs <> fs)

Uses (7)

Used by (1)