You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Customer Portal Attach File in incident creation

Question
11
Views
0
Comments
edited Aug 6, 2020 3:27PM in Customer Portal

Summary

Fatal error: Uncaught exception 'RightNow\Connect\v1_3\ConnectAPIError' with message 'File specified could not be found: /tmp/Annotation 2020-07-06 231020.png'

Content

Please help. I'm trying to include add file attachment method in our new form. But Fatal error: Uncaught exception 'RightNow\Connect\v1_3\ConnectAPIError' with message 'File specified could not be found: /tmp/Annotation 2020-07-06 231020.png' was encountered. Below are my code. 
 
Thanks in advance!
Jenny

Version

v1.3

Code Snippet

$incident->FileAttachments = new RNCPHP\FileAttachmentIncidentArray();
$fattach = new RNCPHP\FileAttachmentIncident();
$temporaryName = $exfile;
$uploaddir = get_cfg_var('upload_tmp_dir');
$file = $uploaddir ."/". basename(strval($temporaryName));
$fattach->setFile($file);
$fattach->FileName = $exfile;
$fattach->Name = $exfile;
$incident->FileAttachments[] = $fattach;

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!