Documentation
FilesUploader
Sushee PHP class intended to make files upload easier to manage.
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();