Skip to content

Multi form-data issues #9

Description

@gitaccxz

This data how to send?

$BODY .= '------WebKitFormBoundary'.$BOUNDARY.$eol;
$BODY .= 'Content-Disposition: form-data; name="file"; filename="'.basename($cp).'"'.$eol;
$BODY .= 'Content-Type: image/'.pathinfo(basename($cp), PATHINFO_EXTENSION).$eol.$eol;
$BODY .= $Pic.$eol; 

Trying like this:

$request->addPostFile('file', $cp, basename($cp));
$request->addPostField('Content-Type', 'image/'.pathinfo(basename($cp), PATHINFO_EXTENSION));

Name field: file
Filename: how to add?
2nd Line Content-Type: How to add?
$Pic: image how to add?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions