Change "tmp" dir for uploading file - PHP / Upload / Editor

Change "tmp" dir for uploading file - PHP / Upload / Editor

Brandon_Voorvelt01Brandon_Voorvelt01 Posts: 3Questions: 2Answers: 0

Hi All,

I'm trying to upload an image using the Editor PHP library.

Following the manuals, I have got it down pretty well (Allan you are a legend!!)
When uploading, traditionally, the file is stored in the temp folder before it's moved to the actual folder/database.

My only issue now is, my back-end guys have removed all permissions for the "tmp" folder on the server. :(
So when I try to create/edit (haven't tried remove) the image using Editor - I get this error:


"A server error occurred while uploading the file".

Checking the response in the inspector, this is printed out: (I took out my server root)

Warning: move_uploaded_file(..../uploads/lts.png): failed to open stream: Permission denied in /..../dist/lib/Editor/Upload.php on line 488

Warning: move_uploaded_file(): Unable to move '/tmp/phpXDWwY4' to '..../uploads/lts.png' in /***/dist/lib/Editor/Upload.php on line 488

Is there a way to change the temp folder directory in the Upload instance? Perhaps somewhere here:
->upload( Upload::inst( $_SERVER['DOCUMENT_ROOT'].'/uploads/__NAME__' )

Answers

This discussion has been closed.