diff --git a/app/Http/Controllers/Upload.php b/app/Http/Controllers/Upload.php index 87ca057..5239d1c 100644 --- a/app/Http/Controllers/Upload.php +++ b/app/Http/Controllers/Upload.php @@ -40,12 +40,12 @@ class Upload extends Controller $location = 'upload/images'; $backupdir = Carbon::now()->format('Y/m/d'); - $backupdir = 'upload/images/backup/' + $backupdir; + $backupdir = sprintf('upload/images/backup/%s',$backupdir); $bckfile = Carbon::now()->format('Hi'); - $bckfile = $bckfile + '.jpg'; + $bckfile = sprintf('%s.jpg',$bckfile); // Upload file - $file->copy($backupdir,$bckfile); - $file->move($location,$filename); + $file->move($backupdir,$bckfile); + \File::copy($backupdir."/".$bckfile,$location."/".$filename); echo 'Upload Successful.'; }else{ echo 'File too large. File must be less than 2MB.'; diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index 80bdd92..7bd04fe 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -185,7 +185,7 @@
Obrázok z kamery
- +