@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace h4kuna\Upload; |
| 4 | 4 | |
| 5 | -use Nette\Application, |
|
| 6 | - Nette\Http; |
|
| 5 | +use Nette\Application; |
|
| 6 | +use Nette\Http; |
|
| 7 | 7 | |
| 8 | 8 | class Download |
| 9 | 9 | { |
@@ -29,6 +29,9 @@ |
||
| 29 | 29 | return $this->hostUrl . '/' . Upload\Utils::makeRelativePath($relativePath); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @param string $relativePath |
|
| 34 | + */ |
|
| 32 | 35 | public function isFileExists($relativePath) |
| 33 | 36 | { |
| 34 | 37 | return $this->ftp->fileExists(Upload\Utils::makeRelativePath($relativePath)); |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace h4kuna\Upload\Driver; |
| 4 | 4 | |
| 5 | -use h4kuna\Upload, |
|
| 6 | - Nette\Http; |
|
| 5 | +use h4kuna\Upload; |
|
| 6 | +use Nette\Http; |
|
| 7 | 7 | |
| 8 | 8 | class Ftp implements Upload\IDriver |
| 9 | 9 | { |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | { |
| 39 | 39 | $path = Upload\Utils::makeRelativePath($relativePath); |
| 40 | 40 | $dir = dirname($relativePath); |
| 41 | - if($dir !== '.') { |
|
| 41 | + if ($dir !== '.') { |
|
| 42 | 42 | $this->ftp->mkDirRecursive($dir); |
| 43 | 43 | } |
| 44 | 44 | $this->ftp->put($path, $fileUpload->getTemporaryFile(), FTP_BINARY); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | ->addSetup('connect', [$options['host'], $options['port']]) |
| 44 | 44 | ->addSetup('login', [$options['user'], $options['password']]) |
| 45 | 45 | ->addSetup('pasv', [$options['passive']]); |
| 46 | - if($options['path']) { |
|
| 46 | + if ($options['path']) { |
|
| 47 | 47 | $ftp->addSetup('chdir', [$options['path']]); |
| 48 | 48 | } |
| 49 | 49 | |