@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | \Log::debug($data); |
17 | 17 | |
18 | 18 | if (Request::hasFile('image')) { |
19 | - $fileData = Request::file('image'); |
|
19 | + $fileData = Request::file('image'); |
|
20 | 20 | //$fileData = Image::make($file)->encode('jpg', 80); |
21 | 21 | |
22 | 22 | $date = Carbon::now(); |
23 | 23 | $folderName = $date->hour . ':' . $date->minute . ':' . $date->second; |
24 | 24 | |
25 | 25 | $newFilename = \App::environment() . '/cctv/' . $date->year . '/' . $date->month . '/' . $date->day . '/' . $folderName . '/' . str_random() . '.jpg'; |
26 | - Storage::put($newFilename, (string) $fileData, 'public'); |
|
26 | + Storage::put($newFilename, (string)$fileData, 'public'); |
|
27 | 27 | |
28 | 28 | \Slack::to("#cctv")->attach(['image_url'=>'https://s3-eu-west-1.amazonaws.com/buildbrighton-bbms/' . $newFilename, 'color'=>'warning'])->send('New image'); |
29 | 29 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | 'ContentType' => 'image/jpg', |
62 | 62 | 'ServerSideEncryption' => 'AES256', |
63 | 63 | )); |
64 | - } catch(\Exception $e) { |
|
64 | + } catch (\Exception $e) { |
|
65 | 65 | \Log::exception($e); |
66 | 66 | } |
67 | 67 | //Log::debug('Image saved :https://s3-eu-west-1.amazonaws.com/buildbrighton-bbms/'.$newFilename); |