Skip to content

Commit ff0b456

Browse files
committed
Merge pull request #17 from tsawler/Development
Development
2 parents 7a176d2 + fa4bc97 commit ff0b456

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

public/files/adobe.pdf

8.32 KB
Binary file not shown.
204 KB
Loading

public/files/word.docx

481 KB
Binary file not shown.

src/controllers/FolderController.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
use Illuminate\Support\Facades\Config;
55
use Illuminate\Support\Facades\File;
66
use Illuminate\Support\Facades\Input;
7-
use Illuminate\Support\Facades\Redirect;
8-
use Illuminate\Support\Str;
97
use Illuminate\Support\Facades\Session;
108
use Illuminate\Support\Facades\View;
11-
use Illuminate\Support\Facades\Log;
9+
use Illuminate\Support\Str;
1210

1311
/**
1412
* Class FolderController
@@ -58,9 +56,8 @@ public function getFolders()
5856
public function getAddfolder()
5957
{
6058
$folder_name = Str::slug(Input::get('name'));
61-
$working_dir = Input::get('dir');
6259

63-
$path = base_path($this->file_location . $working_dir);
60+
$path = base_path($this->file_location);
6461

6562
if (!File::exists($path . "/" . $folder_name))
6663
{

src/controllers/UploadController.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ public function upload()
9494

9595
$new_filename = Str::slug(str_replace($extension, '', $filename)) . "." . $extension;
9696

97+
if (File::exists($destinationPath . $new_filename))
98+
{
99+
return "A file with this name already exists!";
100+
exit;
101+
}
102+
97103
Input::file('file_to_upload')->move($destinationPath, $new_filename);
98104

99105
return "OK";

src/views/images.blade.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55

66
@foreach($directories as $key => $dir)
77
<div class="col-sm-6 col-md-2">
8-
<div class="thumbnail text-center" data-id="{{ basename($dir) }}">
8+
<div class="thumbnail text-center";" data-id="{{ basename($dir) }}">
99
<a id="large_folder_{{ $key }}" data-id="{{ $dir }}"
1010
onclick="clickFolder('large_folder_{{ $key }}',1)"
1111
class="folder-icon pointer">
12+
{{--<i class="fa fa-folder-o fa-5x"></i>--}}
1213
<img src="/vendor/laravel-filemanager/img/folder.jpg">
1314
</a>
1415
</div>

0 commit comments

Comments
 (0)