remove temp file if uploaded file duplicated

This commit is contained in:
printempw 2016-12-14 22:11:40 +08:00
parent 223081cf05
commit 8e75b3b605

View File

@ -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;