@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | $this->setJsonHeader(); |
34 | 34 | if (!$file || Any::isEmpty($file)) { |
35 | - $file = (string)$this->request->query->get('file', null); |
|
35 | + $file = (string) $this->request->query->get('file', null); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | // check passed data |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | // generate path |
51 | - $thumb = '/upload/gallery/' . $id . '/thumb/' . $fileName . '.jpg'; |
|
52 | - $full = '/upload/gallery/' . $id . '/orig/' . $file; |
|
51 | + $thumb = '/upload/gallery/'.$id.'/thumb/'.$fileName.'.jpg'; |
|
52 | + $full = '/upload/gallery/'.$id.'/orig/'.$file; |
|
53 | 53 | |
54 | 54 | // check if file exists and remove |
55 | 55 | if (File::exist($thumb) || File::exist($full)) { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | throw new NativeException('Permission denied'); |
39 | 39 | } |
40 | 40 | |
41 | - $thumbDir = Normalize::diskFullPath('/upload/gallery/' . $id . '/orig/'); |
|
41 | + $thumbDir = Normalize::diskFullPath('/upload/gallery/'.$id.'/orig/'); |
|
42 | 42 | if (!Directory::exist($thumbDir)) { |
43 | 43 | throw new NotFoundException('Nothing found'); |
44 | 44 | } |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | $fileExt = Str::lastIn($file, '.'); |
54 | 54 | $fileName = Str::sub($file, 0, -Str::length($fileExt)); |
55 | 55 | $output[] = [ |
56 | - 'thumbnailUrl' => '/upload/gallery/' . $id . '/thumb/' . $fileName . '.jpg', |
|
57 | - 'url' => '/upload/gallery/' . $id . '/orig/' . $file, |
|
56 | + 'thumbnailUrl' => '/upload/gallery/'.$id.'/thumb/'.$fileName.'.jpg', |
|
57 | + 'url' => '/upload/gallery/'.$id.'/orig/'.$file, |
|
58 | 58 | 'name' => $file, |
59 | - 'size' => File::size('/upload/gallery/' . $id . '/orig/' . $file) |
|
59 | + 'size' => File::size('/upload/gallery/'.$id.'/orig/'.$file) |
|
60 | 60 | ]; |
61 | 61 | } |
62 | 62 |