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

File upload error: File specified could not be found: /tmp/

Accepted answer
94
Views
18
Comments
edited Jun 7, 2022 12:35PM in General Technical Discussions 18 comments

Content

Hi,

I am trying to upload file from customer portal, but i am getting an Fatal error: Uncaught exception 'RightNow\Connect\v1_2\ConnectAPIError' with message 'File path is not in temporary directory: /tmp/'

below is the code i am using.

$incident->FileAttachments =new RNCPHP\FileAttachmentIncidentArray();
            $fattach = new RNCPHP\FileAttachmentIncident();
            $fattach->ContentType = "text/text";
            $file = '/tmp/'.$this->input->post('fileToUpload'); 
            $fattach->setFile($file);
            $fattach->FileName = $this->input->post('fileToUpload');
            $oFinance->FileAttachments[] = $fattach;

Please help me how to set temp folder.

Thanks,

Chakravarthy

 

Version

3.2

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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