Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURLOPT_POSTFIELDS should be array #36

Open
jmu0 opened this issue Apr 15, 2021 · 0 comments
Open

CURLOPT_POSTFIELDS should be array #36

jmu0 opened this issue Apr 15, 2021 · 0 comments

Comments

@jmu0
Copy link

jmu0 commented Apr 15, 2021

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')));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant