I am trying to work out how to use the wp_handle_upload function for a custom plugin so that i can specify my own own upload directory. The code so far takes a file from my plugin settings page and uploads to the folder uploads folder with the year and month.
I came across this link which I thought might have some clues - http://yoast.com/smarter-upload-handling-wp-plugins
if(strtolower($_SERVER['REQUEST_METHOD']) == "post"){
$overrides = array('test_form' => false);
$file = wp_handle_upload($_FILES['binaryFile'], $overrides);
echo "<pre>" . print_r($file, true) . "</pre>";
}
How can I upload to a directory of my choosing?
Any help much appreciated guys.