Skip to content

Commit

Permalink
files type
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Mar 14, 2015
1 parent d5e2a03 commit 24382a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Services/Upload/FileUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ public function handle(UploadedFile $file, $path = 'uploads')

$fileTypes = Config::get('file.types');
$input['type'] = $fileTypes[strtolower($file->getClientOriginalExtension())];
try {
$input['type'] = $fileTypes[strtolower($file->getClientOriginalExtension())];
} catch (Exception $e) {
$input['type'] = 'd';
}

$filecounter = 1;
while (file_exists($input['path'] . '/' . $input['filename'])) {
Expand Down

0 comments on commit 24382a1

Please # to comment.