Learn R Programming

webdeveloper (version 1.0.5)

parseMultiPartFormData: Parse multi-part form data

Description

Parse multi-part form data

Usage

parseMultiPartFormData(x, boundary)

Value

A named list.

Arguments

x

A vector.

boundary

A string, the boundary used for the multi-part form data

Examples

Run this code
parseMultiPartFormData(
x = c(
  "------WebKitFormBoundaryfBloeH49iOmYtO5A",
  "Content-Disposition: form-data; name=\"form_name\"",
  "",
  "Example",
  "------WebKitFormBoundaryfBloeH49iOmYtO5A",
  "Content-Disposition: form-data; name=\"form_id\"",
  "",
  "test",
  "------WebKitFormBoundaryfBloeH49iOmYtO5A",
  "Content-Disposition: form-data; name=\"desktop_file\"; filename=\"limit_type.csv\"",
  "Content-Type: text/csv",
  "",
  "limit_type",
  "Aggregate",
  "Occurrence",
  "------WebKitFormBoundaryfBloeH49iOmYtO5A--"
),
boundary = parseContentTypeHeader(
"multipart/form-data; boundary=----WebKitFormBoundaryfBloeH49iOmYtO5A")[['boundary']]
)

Run the code above in your browser using DataLab