remove temp file if uploaded file duplicated
This commit is contained in:
parent
223081cf05
commit
8e75b3b605
|
|
@ -31,6 +31,9 @@ class Utils
|
|||
|
||||
if (!Storage::disk('textures')->has($hash)) {
|
||||
Storage::disk('textures')->move($path, $hash);
|
||||
} else {
|
||||
// delete the temp file
|
||||
unlink($absolute_path);
|
||||
}
|
||||
|
||||
return $hash;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user