Remove temporary upload if we have a duplicate.
This commit is contained in:
parent
5e68235616
commit
6c2dab5c50
1 changed files with 3 additions and 1 deletions
|
@ -29,6 +29,8 @@ class Upload extends CI_Controller {
|
|||
$duplicate = $this->fileupload->check_duplicate($hash);
|
||||
|
||||
if($duplicate) {
|
||||
unlink($upload['full_path']);
|
||||
|
||||
$message = array('type'=>'error', 'status'=>'file already exists:' . $duplicate);
|
||||
} else {
|
||||
$file_name = $this->fileupload->add_upload($upload['file_ext'], $upload['client_name'],$hash);
|
||||
|
|
Loading…
Reference in a new issue