@@ -50,7 +50,6 @@ |
||
| 50 | 50 | * |
| 51 | 51 | * Returns a exif of picture |
| 52 | 52 | * |
| 53 | - * @param string $location a path picture |
|
| 54 | 53 | * @return array |
| 55 | 54 | */ |
| 56 | 55 | public function exif($fileId) { |
@@ -45,31 +45,31 @@ |
||
| 45 | 45 | /** @var ILogger */ |
| 46 | 46 | private $logger; |
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * @NoAdminRequired |
|
| 50 | - * |
|
| 51 | - * Returns a exif of picture |
|
| 52 | - * |
|
| 53 | - * @param string $location a path picture |
|
| 54 | - * @return array |
|
| 55 | - */ |
|
| 56 | - public function exif($fileId) { |
|
| 57 | - $file = $this->downloadService->getFile($fileId); |
|
| 58 | - $path=$file->getInternalPath(); |
|
| 59 | - $storage=$file->getStorage(); |
|
| 60 | - $filename=$storage->getLocalFile($path); |
|
| 61 | - $exif = false; |
|
| 62 | - $iptc = false; |
|
| 63 | - if (is_callable('exif_read_data')) { |
|
| 48 | + /** |
|
| 49 | + * @NoAdminRequired |
|
| 50 | + * |
|
| 51 | + * Returns a exif of picture |
|
| 52 | + * |
|
| 53 | + * @param string $location a path picture |
|
| 54 | + * @return array |
|
| 55 | + */ |
|
| 56 | + public function exif($fileId) { |
|
| 57 | + $file = $this->downloadService->getFile($fileId); |
|
| 58 | + $path=$file->getInternalPath(); |
|
| 59 | + $storage=$file->getStorage(); |
|
| 60 | + $filename=$storage->getLocalFile($path); |
|
| 61 | + $exif = false; |
|
| 62 | + $iptc = false; |
|
| 63 | + if (is_callable('exif_read_data')) { |
|
| 64 | 64 | $exif=@exif_read_data($filename); |
| 65 | - } |
|
| 66 | - getimagesize($filename,$blocks); |
|
| 67 | - if (is_array($blocks)) { |
|
| 65 | + } |
|
| 66 | + getimagesize($filename,$blocks); |
|
| 67 | + if (is_array($blocks)) { |
|
| 68 | 68 | foreach($blocks as $key => $block) { |
| 69 | - $iptc[$key]=iptcparse($block); |
|
| 69 | + $iptc[$key]=iptcparse($block); |
|
| 70 | + } |
|
| 70 | 71 | } |
| 71 | - } |
|
| 72 | - return ['exif'=>$exif,'iptc'=>$iptc]; |
|
| 72 | + return ['exif'=>$exif,'iptc'=>$iptc]; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -55,21 +55,21 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function exif($fileId) { |
| 57 | 57 | $file = $this->downloadService->getFile($fileId); |
| 58 | - $path=$file->getInternalPath(); |
|
| 59 | - $storage=$file->getStorage(); |
|
| 60 | - $filename=$storage->getLocalFile($path); |
|
| 58 | + $path = $file->getInternalPath(); |
|
| 59 | + $storage = $file->getStorage(); |
|
| 60 | + $filename = $storage->getLocalFile($path); |
|
| 61 | 61 | $exif = false; |
| 62 | 62 | $iptc = false; |
| 63 | 63 | if (is_callable('exif_read_data')) { |
| 64 | - $exif=@exif_read_data($filename); |
|
| 64 | + $exif = @exif_read_data($filename); |
|
| 65 | 65 | } |
| 66 | - getimagesize($filename,$blocks); |
|
| 66 | + getimagesize($filename, $blocks); |
|
| 67 | 67 | if (is_array($blocks)) { |
| 68 | - foreach($blocks as $key => $block) { |
|
| 69 | - $iptc[$key]=iptcparse($block); |
|
| 68 | + foreach ($blocks as $key => $block) { |
|
| 69 | + $iptc[$key] = iptcparse($block); |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | - return ['exif'=>$exif,'iptc'=>$iptc]; |
|
| 72 | + return ['exif'=>$exif, 'iptc'=>$iptc]; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -27,7 +27,6 @@ |
||
| 27 | 27 | * |
| 28 | 28 | * Returns a exif of picture |
| 29 | 29 | * |
| 30 | - * @param string $location a path picture |
|
| 31 | 30 | * @return array |
| 32 | 31 | */ |
| 33 | 32 | public function exif($fileId) { |
@@ -22,17 +22,17 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | class FilesPublicController extends FilesController { |
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * @PublicPage |
|
| 27 | - * |
|
| 28 | - * Returns a exif of picture |
|
| 29 | - * |
|
| 30 | - * @param string $location a path picture |
|
| 31 | - * @return array |
|
| 32 | - */ |
|
| 33 | - public function exif($fileId) { |
|
| 25 | + /** |
|
| 26 | + * @PublicPage |
|
| 27 | + * |
|
| 28 | + * Returns a exif of picture |
|
| 29 | + * |
|
| 30 | + * @param string $location a path picture |
|
| 31 | + * @return array |
|
| 32 | + */ |
|
| 33 | + public function exif($fileId) { |
|
| 34 | 34 | return parent::exif($fileId); |
| 35 | - } |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @PublicPage |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | 'verb' => 'GET' |
| 98 | 98 | ], |
| 99 | 99 | // exif of picture |
| 100 | - [ |
|
| 101 | - 'name' => 'files#exif', |
|
| 102 | - 'url' => '/files/exif/{fileId}', |
|
| 103 | - 'verb' => 'GET' |
|
| 104 | - ], |
|
| 100 | + [ |
|
| 101 | + 'name' => 'files#exif', |
|
| 102 | + 'url' => '/files/exif/{fileId}', |
|
| 103 | + 'verb' => 'GET' |
|
| 104 | + ], |
|
| 105 | 105 | /** |
| 106 | 106 | * Public services |
| 107 | 107 | */ |
@@ -132,11 +132,11 @@ discard block |
||
| 132 | 132 | 'verb' => 'GET' |
| 133 | 133 | ], |
| 134 | 134 | // exif of picture |
| 135 | - [ |
|
| 136 | - 'name' => 'files_public#exif', |
|
| 137 | - 'url' => '/files.public/exif/{fileId}', |
|
| 138 | - 'verb' => 'GET' |
|
| 139 | - ], |
|
| 135 | + [ |
|
| 136 | + 'name' => 'files_public#exif', |
|
| 137 | + 'url' => '/files.public/exif/{fileId}', |
|
| 138 | + 'verb' => 'GET' |
|
| 139 | + ], |
|
| 140 | 140 | /** |
| 141 | 141 | * API |
| 142 | 142 | */ |