parent
6b16df8966
commit
5cd2c5263e
|
@ -913,12 +913,13 @@ SQL;
|
||||||
* @param string $tempFilePath
|
* @param string $tempFilePath
|
||||||
* @param string $originalFilename
|
* @param string $originalFilename
|
||||||
* @param bool $copyFile copy the file instead of moving it
|
* @param bool $copyFile copy the file instead of moving it
|
||||||
|
* @param mixed $fileId
|
||||||
*
|
*
|
||||||
* @return Ambigous <unknown, string>
|
* @return Ambigous <unknown, string>
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function moveFileToStor($tempFilePath, $originalFilename, $copyFile = false)
|
public static function moveFileToStor($tempFilePath, $fileId, $originalFilename, $copyFile = false)
|
||||||
{
|
{
|
||||||
$audio_file = $tempFilePath;
|
$audio_file = $tempFilePath;
|
||||||
|
|
||||||
|
@ -938,7 +939,7 @@ SQL;
|
||||||
$audio_stor = Application_Common_OsPath::join(
|
$audio_stor = Application_Common_OsPath::join(
|
||||||
$stor,
|
$stor,
|
||||||
'organize',
|
'organize',
|
||||||
$originalFilename
|
$fileId . '-' . $originalFilename
|
||||||
);
|
);
|
||||||
// if the uploaded file is not UTF-8 encoded, let's encode it. Assuming source
|
// if the uploaded file is not UTF-8 encoded, let's encode it. Assuming source
|
||||||
// encoding is ISO-8859-1
|
// encoding is ISO-8859-1
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Application_Service_MediaService
|
||||||
|
|
||||||
// Copy the temporary file over to the "organize" folder so that it's off our webserver
|
// Copy the temporary file over to the "organize" folder so that it's off our webserver
|
||||||
// and accessible by libretime-analyzer which could be running on a different machine.
|
// and accessible by libretime-analyzer which could be running on a different machine.
|
||||||
$newTempFilePath = Application_Model_StoredFile::moveFileToStor($filePath, $originalFilename, $copyFile);
|
$newTempFilePath = Application_Model_StoredFile::moveFileToStor($filePath, $fileId, $originalFilename, $copyFile);
|
||||||
|
|
||||||
// Dispatch a message to libretime-analyzer through RabbitMQ,
|
// Dispatch a message to libretime-analyzer through RabbitMQ,
|
||||||
// notifying it that there's a new upload to process!
|
// notifying it that there's a new upload to process!
|
||||||
|
|
Loading…
Reference in New Issue