I know how to get the files name, but how do you get the directory path of the file that was uploaded?
Thanks in advance!
-
☆ A M B ☆
- 3,141 Posts
http://rtfm.modx.com/display/revolution20/OnFileManagerUpload
files An array of files from the PHP $_FILES array.
directory A reference to the modDirectory object that the files are being uploaded to
PHP's $_FILES array has a 'tmp_name' attribute that can be used with the move_uploaded_file() function.
http://php.net/manual/en/function.move-uploaded-file.php
The modDirectory object in $directory has a few helpful methods, they're all in the API docs:
http://api.modx.com/revolution/2.2/db_core_model_modx_modfilehandler.class.html#\modDirectory
(*hint* see getPath)