Beispiel #1
0
 /**
  * Initialise new instance of Path service
  */
 public function __construct()
 {
     $this->thumb_dir = FileManager::package()->config('thumbs_dir', 'thumbs');
     $root_dir = FileSystem::canonical(FileManager::package()->config('target_dir', 'storage/uploads'));
     $this->sys_root_dir = base_path($root_dir);
     if (!FileSystem::exists($this->sys_root_dir)) {
         FileSystem::mkdir($this->sys_root_dir, 777);
     }
     $this->updatePath();
 }
Beispiel #2
0
 /**
  * Initialise new instance of Icon service
  */
 public function __construct()
 {
     $pck = FileManager::package();
     $this->url = $pck->config('icons.url', '');
     $pck->mergeWithConfig($this->icon_names, 'icons.files', [], false);
 }
Beispiel #3
0
 /**
  * Initialise new instance of Url service
  */
 public function __construct()
 {
     $pck = FileManager::package();
     $this->dir_action = $pck->config('actions.dir', '\\Crip\\FileManager\\App\\Controllers\\DirectoryController@dir');
     $this->file_action = $pck->config('actions.file', '\\Crip\\FileManager\\App\\Controllers\\FileController@file');
 }
Beispiel #4
0
 /**
  * Initialise new instance of Mime service
  */
 public function __construct()
 {
     $pck = FileManager::package();
     $pck->mergeWithConfig($this->mimes, 'mime.types');
     $pck->mergeWithConfig($this->media_mapping, 'mime.media');
 }
Beispiel #5
0
 /**
  * Initialise new instance of Thumb service
  * @param Url $url
  */
 public function __construct(Url $url)
 {
     $this->url = $url;
     FileManager::package()->mergeWithConfig($this->sizes, 'thumbs');
 }