i want to move a uploaded file locate in public:// to a folder inside mymodule.
I try
$dirname = dirname(__file__);
$fullpath = strpos($dirname, '\\') === false ? $dirname . '/' . $file->filename : $dirname . '\\' . $file->filename;
$go = file_move($file, $fullpath);
and i got this error
The specified file public://xxx.BMP could not be moved, because the destination is invalid. More information is available in the system log.
But de $destination is valid and is mymodule's folder!!
Can anyone helpme to move-it?
Thanks!!!