From bc662ed770213d828eddc0563786303c6257bb79 Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Mon, 4 Jul 2016 01:16:22 -0700 Subject: [PATCH] Add protip --- examples/upload_file.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/upload_file.php b/examples/upload_file.php index 8621889..94b6e99 100644 --- a/examples/upload_file.php +++ b/examples/upload_file.php @@ -6,6 +6,12 @@ use \Curl\Curl; $myfile = curl_file_create('cats.jpg', 'image/png', 'test_name'); $curl = new Curl(); + +// HINT: If API documentation refers to using something like curl -F "myimage=image.png", +// curl --form "myimage=image.png", or the html form is similar to
, +// then try uncommenting the following line: +// $curl->setHeader('Content-Type', 'multipart/form-data'); + $curl->post('https://httpbin.org/post', array( 'myfile' => $myfile, ));