AnsweredAssumed Answered

Upload Document as "String"

Question asked by Jason Ziolo on Jun 22, 2015
I'm successfully uploading a document using the Sugar API by specifying the path of the file.  I'd really like to send the file as a string (since I have it outputted as string using the $pdf->Output('', 'S') in FPDF) instead of saving it to the file system.  Is there a way to modify this API call to make that happen?

$url = SUGAR_BASE_URL  . "/Documents/$doc_response->id/file/filename";

$file_arguments = array("delete_if_fails" => true,
    "oauth_token" => $token,
    'filename' => "@C:\example.pdf",

$file_response = call($url, $token, 'POST', $file_arguments, false);