Dec 3, 2015
0
Level 17
How to send a file with Guzzle?
Hi, How do you upload a file and send it with Guzzle HTTP post request. Here's the same curl code:
curl https://upload.box.com/api/2.0/files/content \
-H "Authorization: Bearer ACCESS_TOKEN" -X POST \
-F attributes='{"name":"tigers.jpeg", "parent":{"id":"11446498"}}' \
-F file=@myfile.jpg
I couldn't figure out where to add the files with the Guzzle so it will send with the request. I also need to know how to add the attributes.
Please or to participate in this conversation.