This commit is contained in:
2020-08-31 12:38:32 +08:00
parent 683a39dded
commit 65c443ec87
126 changed files with 7369 additions and 228 deletions
+13
View File
@@ -155,6 +155,19 @@ class Snowflake
}
public static function rename($tmp)
{
$hash = md5_file($tmp['tmp_name']);
$later = '.' . exif_imagetype($tmp['tmp_name']);
$match = '/(\w{12})(\w{5})(\w{9})(\w{6})/';
$tmp = preg_replace($match, '$1-$2-$3-$4', $hash);
return strtoupper($tmp) . $later;
}
/**
* @return bool
*/