LiquidPlanner Classic Forum
Why can't I seem to upload a document to a project? Help please!
over 5 years ago by LiquidPlanner Support
Posted on behalf of Daniel. Original posting date 2014-08-29.
Here is an excerpt of my code, for some reason it is not working, I get no response...
$files = array(
"document[file_name]" => "REF_test.jpg",
"document[attached_file]" => "@http://staff:8888/wp-content/uploads/gravity_forms/1-3bab614b6c004fcb7b90a7b24fea4764/2014/08/test.jpg",
);
curl_setopt($conn, CURLOPT_URL, $url."/projects/".$projectID."/documents" );
curl_setopt($conn, CURLOPT_POST, true);
curl_setopt($conn, CURLOPT_POSTFIELDS, $files);
$responseDocument = json_decode(curl_exec($conn));
I know the project ID works because I am attaching a Note tot he project just fine. Do you see anythign that should make this not work?