diff options
Diffstat (limited to 'lib/image.php')
-rw-r--r-- | lib/image.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/image.php b/lib/image.php index 7f98a08d7..14ac2e688 100644 --- a/lib/image.php +++ b/lib/image.php @@ -60,6 +60,13 @@ class TidypicsImage extends ElggFile { */ public function saveImageFile($uploadedFilename, $size) { + // we need to make sure the directory for the album exists + // @note for group albums, the photos are distributed among the users + $dir = tp_get_img_dir() . $this->getContainer(); + if (!file_exists($dir)) { + mkdir($dir, 0755, true); + } + $filename = $this->getFilenameOnFilestore(); $result = move_uploaded_file($uploadedFilename, $filename); |