BLUE-8: OpenStack driver is now uploading files to OS. Need another config field for the public URL to the container.

This commit is contained in:
Andy Heathershaw
2016-10-28 06:24:34 +01:00
parent aadc39684f
commit 005c5eb645
4 changed files with 73 additions and 16 deletions
+4 -4
View File
@@ -51,9 +51,6 @@ class PhotoService
public function analyse($queueToken)
{
/** @var Album $album */
$album = $this->photo->album;
$photoFile = join(DIRECTORY_SEPARATOR, [
FileHelper::getQueuePath($queueToken),
$this->photo->storage_file_name
@@ -119,6 +116,9 @@ class PhotoService
$this->photo->is_analysed = true;
$this->photo->save();
// Save the original
$this->albumSource->saveOriginal($this->photo, $photoFile);
$this->regenerateThumbnails($originalPhotoResource);
}
@@ -198,7 +198,7 @@ class PhotoService
foreach ($thumbnailsRequired as $thumbnail)
{
$generatedThumbnailPath = $this->imageHelper->generateThumbnail($originalPhotoResource, $this->photo, $thumbnail);
$this->albumSource->saveThumbnail($this->photo, $thumbnail, $generatedThumbnailPath);
$this->albumSource->saveThumbnail($this->photo, $generatedThumbnailPath, $thumbnail['name']);
}
}