1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-29 07:50:29 +02:00

feat(media): Media API implementation #428

This commit is contained in:
Awilum
2020-06-05 21:18:50 +03:00
parent 0a39d8f512
commit 3203f94dbe

View File

@@ -15,7 +15,7 @@ use Intervention\Image\ImageManagerStatic as Image;
use Slim\Http\Environment;
use Slim\Http\Uri;
class MediaFoldes
class MediaFolders
{
/**
* Flextype Dependency Container
@@ -46,7 +46,7 @@ class MediaFoldes
public function create(string $id) : bool
{
if (!Filesystem::has($this->getDirLocation($id)) && !Filesystem::has($this->flextype['media_folders_meta']->getDirMetaLocation($id))) {
if (Filesystem::createDir($this->getDirLocation($id))) {
if (Filesystem::createDir($this->getDirLocation($id)) && Filesystem::createDir($this->flextype['media_folders_meta']->getDirMetaLocation($id))) {
return true;
} else {
return false;