Storage System
How UNA 15 stores and serves files through storage objects, local and remote engines. 'OBJECT_STORAGE' => 'bx_posts_covers',
'OBJECT_STORAGE_FILES' => 'bx_posts_files',
'OBJECT_STORAGE_PHOTOS' => 'bx_posts_photos',
'OBJECT_STORAGE_VIDEOS' => 'bx_posts_videos',
'OBJECT_STORAGE_SOUNDS' => 'bx_posts_sounds',
$oStorage = BxDolStorage::getObjectInstance($this->_oConfig->CNF['OBJECT_STORAGE']);
if (!$oStorage)
return false;
$iFileId = $oStorage->storeFileFromForm($_FILES['file'], true, $iProfileId);
if ($iFileId === false) {
// $oStorage->getErrorString() / getErrorCode()
return false;
}
// persist $iFileId on your content row, then clear the ghost
$oStorage->afterUploadCleanup($iFileId, $iProfileId);
$sUrl = $oStorage->getFileUrlById($iFileId);
$aFile = $oStorage->getFile($iFileId);
16d