protected function _handleFiles(EntityInterface $entity) {
		$files = $this->getConfig('file');
		if (is_string($files)) {
			$files = [$files => $this->getConfig('defaults')];
		}

		$results = [];
		foreach ($files as $key => $file) {
			if (is_string($key)) {
				$field = $key;
				$options = $this->getConfig('defaults');
				$options += $file;
			}
			if (is_string($file)) {
				$field = $file;
				$options = $this->getConfig('defaults');
			}
			$results[$field] = $this->saveFile($entity->{$field}, $options);
		}

		return $results;
	}
protected function _handleFiles(EntityInterface $entity) {
		$files = $this->getConfig('file');
		if (is_string($files)) {
			$files = [$files => $this->getConfig('defaults')];
		}

		$results = [];
		foreach ($files as $key => $file) {
			if (is_string($key)) {
				$field = $key;
				$options = $this->getConfig('defaults');
				$options += $file;
			}
			if (is_string($file)) {
				$field = $file;
				$options = $this->getConfig('defaults');
			}
			$results[$field] = $this->saveFile($entity->{$field}, $options);
		}

		return $results;
	}
protected function _handleFiles ( EntityInterface $ entity ) { $ files = $ this -> getConfig ( 'file' ) ; if ( is_string ( $ files ) ) { $ files = [ $ files => $ this -> getConfig ( 'defaults' ) ] ; } $ results = [ ] ; foreach ( $ files as $ key => $ file ) { if ( is_string ( $ key ) ) { $ field = $ key ; $ options = $ this -> getConfig ( 'defaults' ) ; $ options += $ file ; } if ( is_string ( $ file ) ) { $ field = $ file ; $ options = $ this -> getConfig ( 'defaults' ) ; } $ results [ $ field ] = $ this -> saveFile ( $ entity -> { $ field } , $ options ) ; } return $ results ; }
This method is looking for the actual file upload fields and processes them.

@param \Cake\Datasource\EntityInterface
@return array
This method is looking for the actual file upload fields and processes them .