diff --git a/features/file-upload.xml b/features/file-upload.xml index e2000400aa..d11df3a1a8 100644 --- a/features/file-upload.xml +++ b/features/file-upload.xml @@ -83,6 +83,10 @@ Send this file: <INPUT NAME="userfile" TYPE="file"> // Make sure file is coming from upload directory $uploadpath = get_cfg_var('upload_tmp_dir') . '/' . basename($userfile); +// If you have not set your TMPDIR in pnp.ini, the following line +// can be uncommented, and used instead of the above line +// $uploadpath = dirname(tempnam('', '')) . '/' . basename($userfile); + if (file_exists($uploadpath)){ copy ("$uploadpath", "/place/to/put/uploaded/file"); } else {