@@ 85-87 (lines=3) @@ | ||
82 | throw new \LogicException(__('The path for the {0} field is required.', $field)); |
|
83 | } |
|
84 | ||
85 | if (isset($fieldOption['prefix']) && (is_bool($fieldOption['prefix']) || is_string($fieldOption['prefix']))) { |
|
86 | $this->_prefix = $fieldOption['prefix']; |
|
87 | } |
|
88 | ||
89 | $extension = (new File($file['name'], false))->ext(); |
|
90 | $uploadPath = $this->_getUploadPath($entity, $fieldOption['path'], $extension); |
|
@@ 214-216 (lines=3) @@ | ||
211 | $fileInfo = pathinfo($entity->$field); |
|
212 | $newFileInfo = pathinfo($newFile); |
|
213 | ||
214 | if (isset($options['defaultFile']) && (is_bool($options['defaultFile']) || is_string($options['defaultFile']))) { |
|
215 | $this->_defaultFile = $options['defaultFile']; |
|
216 | } |
|
217 | ||
218 | if ($fileInfo['basename'] == $newFileInfo['basename'] || |
|
219 | $fileInfo['basename'] == pathinfo($this->_defaultFile)['basename']) { |