public function store() {
		$this->_storePrecheck();
		$model = $this->loadModel($this->params['model']);
		$fileData = StorageUtils::fileToUploadArray($this->args[0]);
		$entity = $model->newEntity([
			'adapter' => $this->params['adapter'],
			'file' => $fileData,
			'filename' => $fileData['name']
		]);

		if ($model->save($entity)) {
			$this->out('File successfully saved!');
			$this->out('UUID: ' . $entity->id);
			$this->out('Path: ' . $entity->path());
		} else {
			$this->abort('Failed to save the file.');
		}
	}
public function store() {
		$this->_storePrecheck();
		$model = $this->loadModel($this->params['model']);
		$fileData = StorageUtils::fileToUploadArray($this->args[0]);
		$entity = $model->newEntity([
			'adapter' => $this->params['adapter'],
			'file' => $fileData,
			'filename' => $fileData['name']
		]);

		if ($model->save($entity)) {
			$this->out('File successfully saved!');
			$this->out('UUID: ' . $entity->id);
			$this->out('Path: ' . $entity->path());
		} else {
			$this->abort('Failed to save the file.');
		}
	}
public function store ( ) { $ this -> _storePrecheck ( ) ; $ model = $ this -> loadModel ( $ this -> params [ 'model' ] ) ; $ fileData = StorageUtils :: fileToUploadArray ( $ this -> args [ 0 ] ) ; $ entity = $ model -> newEntity ( [ 'adapter' => $ this -> params [ 'adapter' ] , 'file' => $ fileData , 'filename' => $ fileData [ 'name' ] ] ) ; if ( $ model -> save ( $ entity ) ) { $ this -> out ( 'File successfully saved!' ) ; $ this -> out ( 'UUID: ' . $ entity -> id ) ; $ this -> out ( 'Path: ' . $ entity -> path ( ) ) ; } else { $ this -> abort ( 'Failed to save the file.' ) ; } }
Store a local file via command line in any storage backend.

@return void
Store a local file via command line in any storage backend .