Hello I want to create a simple uploader. In the filepicker, where can I find the DIRECTORY in which the file is going to be uploaded?
Thanks.
The Moodle file API does not tell you the directory where the uploaded file will be stored. You can get the contents of the uploaded file like this:
$content = $mform->get_file_content('userfile')
See http://docs.moodle.org/dev/Using_the_File_API_in_Moodle_forms for more details.
Is there some reason why you particularly need the upload directory? If it is essential, then you can always create your own directory, then do something like this:
$fp = fopen($filename, 'w');
fwrite($fp, $contents);
fclose($fp);