usage
FilesUploader->setTarget( Folder target )
paramètres
target : the folder in which the files will be uploaded.
exemples
include('../Kernel/common/file.class.php');
$contactID = 1857;
$uploader = new FilesUploader();
$uploader->addFile( $_FILES['picture'] );
$uploader->addFile( $_FILES['cv'] );
$contact_folder = new Folder('/contact/'.$contactID.'/');
$uploader->setTarget( $contact_folder );
$uploader->execute();
$files = $uploader->getFiles();
$uploaded_picture = $files[0];
$uploaded_cv = $files[1];
$nql = new NQL();
$nql->addCommand(
'<UPDATE>
<CONTACT ID="'.$contactID.'">
<INFO>
<PREVIEW>'.$uploaded_picture->getPath().'</PREVIEW>
</INFO>
</CONTACT>
</UPDATE>'
);
$nql->execute();