guzzle / guzzle

Guzzle, an extensible PHP HTTP client
https://docs.guzzlephp.org/
MIT License
23.15k stars 2.41k forks source link

i want file filed #1660

Closed pouu69 closed 7 years ago

pouu69 commented 7 years ago

i want image upload

like this

curl -v -X POST https://kapi.kakao.com/v1/api/story/upload/multi \
  -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -F "file=@aws-s3-address1" \
  -F "file=@aws-s3-address2"

how can us file filed ?

sagikazarmark commented 7 years ago

Please use StackOverflow for questions like this as the answer is already there: http://stackoverflow.com/questions/38133244/upload-file-using-guzzle-6-to-api-endpoint

BTW what you need is multipart body, which is documented here as well: http://docs.guzzlephp.org/en/latest/request-options.html#multipart