File Upload but store file on a different drive not working
File Upload but store file on a different drive not working

Rather than storing the file on the "$_SERVER['[DOCUMENT_ROOT]']" like in the example found here:
https://editor.datatables.net/examples/advanced/upload.html
The $_SERVER['[DOCUMENT_ROOT] would point onto the C drive under the wwwroot folder. Instead, I wanted to use d drive to store the file location, but I'm unable to do this. It runs, but nothing is stored in the file location I gave it. Below is the code that the server side runs and where it should be stored. Is there something I'm missing?
Field::inst('imageFile')
->setFormatter( Format::ifEmpty( null ) )
->upload( Upload::inst( '**D:/temp**/__ID__.__EXTN__' )
->db( 'propath_dev.tempfile', 'id', array(
'fileName' => Upload::DB_FILE_NAME,
'fileSize' => Upload::DB_FILE_SIZE,
'webPath' => Upload::DB_WEB_PATH,
'systemPath' => Upload::DB_SYSTEM_PATH
) )
->validator( Validate::fileSize( 500000, 'Files must be smaller that 500K' ) )
->validator( Validate::fileExtensions( array( 'pdf' ), "Please upload an PDF" ) )
)
This question has an accepted answers - jump to answer
Answers
Resolved it, if I declare the variable on the page, then it works
Excellent, glad all sorted,
Colin