Skip to content

CURLOPT_POSTFIELDS should be array #36

@jmu0

Description

@jmu0

curl command:
curl -X PUT -F "file=@./test.txt" -H "X-Object-Meta-One: two" -H "X-Object-Meta-Three: Four" http://localhost:8080/test.txt

result line 8:
curl_setopt($ch, CURLOPT_POSTFIELDS, 'file' => '@' .realpath('./test.txt'));

should be:
curl_setopt($ch, CURLOPT_POSTFIELDS, array('file' => '@' . realpath('./test.txt')));

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