mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
change temporary storage config
This commit is contained in:
@@ -69,7 +69,16 @@ class FilesystemService
|
|||||||
|
|
||||||
public function generateTemporarySubdefPathname(\record_adapter $record, \databox_subdef $subdef, $tmpDir)
|
public function generateTemporarySubdefPathname(\record_adapter $record, \databox_subdef $subdef, $tmpDir)
|
||||||
{
|
{
|
||||||
return $tmpDir . $this->generateSubdefFilename($record, $subdef);
|
$tmpDir = \p4string::addEndSlash($tmpDir);
|
||||||
|
$ffmpegDir = $tmpDir."ffmpeg/";
|
||||||
|
|
||||||
|
if(!is_dir($ffmpegDir)){
|
||||||
|
$this->filesystem->mkdir($ffmpegDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
$filenameSufix = $this->generateSubdefFilename($record, $subdef);
|
||||||
|
|
||||||
|
return $ffmpegDir . hash('sha256', $filenameSufix) . $filenameSufix;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -174,10 +174,10 @@ class SubdefGenerator
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmpDir = $this->app['conf']->get(['registry', 'executables', 'ffmpeg-tmp-directory']);
|
$tmpDir = $this->app['conf']->get(['main', 'storage', 'tmp_files']);
|
||||||
$destFile = null;
|
$destFile = null;
|
||||||
|
|
||||||
if($subdef_class->getSpecs() instanceof Video && !empty($tmpDir) && is_dir($tmpDir)){
|
if($subdef_class->getSpecs() instanceof Video && !empty($tmpDir)){
|
||||||
$destFile = $pathdest;
|
$destFile = $pathdest;
|
||||||
$pathdest = $this->filesystem->generateTemporarySubdefPathname($record, $subdef_class, $tmpDir);
|
$pathdest = $this->filesystem->generateTemporarySubdefPathname($record, $subdef_class, $tmpDir);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user