Hi Adam,
I discover that removeFile function don't work for all plugins (imageviewer, mediaconverter) when using "Direct File Servers". So in Admin / file action : all process return a failed messages.
WHY ? Because plugins wasn't updated to work on a fileserver direct. (Even all screenshots for column view mode in "account_home" don't show up when usign "direct file server" with Mediaconverter for instanc )
HOW TO SOLVE IT ?
Need a call to the file Server Direct BUT not the Local as the files are not in local Server :
IMAGEVIEWER CLASS : (Local Call)
MediaConverter CLASS : (Local Call)
This work only for a local server not direct.
Regards,
I discover that removeFile function don't work for all plugins (imageviewer, mediaconverter) when using "Direct File Servers". So in Admin / file action : all process return a failed messages.
WHY ? Because plugins wasn't updated to work on a fileserver direct. (Even all screenshots for column view mode in "account_home" don't show up when usign "direct file server" with Mediaconverter for instanc )
HOW TO SOLVE IT ?
Need a call to the file Server Direct BUT not the Local as the files are not in local Server :
Code:
$serverId = file::getDefaultLocalServerId();
Code:
$serverId = file::getDefaultLocalServerId();
if ($serverId)
{
// get all file listing
$files = coreFunctions::getDirectoryListing($cacheFilePath);
if (COUNT($files))
{
foreach ($files AS $file)
{
fileAction::queueDeleteFile($serverId, $file, $fileId);
}
}
// add folder aswell
fileAction::queueDeleteFile($serverId, $cacheFilePath, $fileId);
// remove any perm_cache
fileAction::queueDeleteFile($serverId, $this->permCachePath . (int)$fileId . '/', $fileId);
}
Code:
public function deleteMediaCache($fileId)
{
// queue for delete
$serverId = file::getDefaultLocalServerId();
if ($serverId)
{
// queue cache for delete on local server
$docRoot = fileServer::getDocRoot($serverId);
$cacheFilePath = $docRoot . '/core/cache/plugins/mediaconverter/' . $fileId . '/original_thumb.jpg';
fileAction::queueDeleteFile($serverId, $cacheFilePath, $fileId);
}
}
Regards,