mirror of
https://github.com/nokonoko/Uguu.git
synced 2024-01-06 13:35:15 +00:00
Update Upload.php
This commit is contained in:
parent
187dfc7404
commit
fe5fd1ac7c
@ -28,7 +28,7 @@
|
||||
|
||||
/**
|
||||
* Takes an array of files, and returns an array of arrays containing the file's temporary name,
|
||||
* name, size, SHA1 hash, extension, and MIME type
|
||||
* name, size, XXH3 hash, extension, and MIME type
|
||||
*
|
||||
* @param $files array The files array from the $_FILES superglobal.
|
||||
*
|
||||
@ -44,7 +44,7 @@
|
||||
'TEMP_NAME' => $file['tmp_name'],
|
||||
'NAME' => strip_tags($this->checkNameLength($file['name'])),
|
||||
'SIZE' => $file['size'],
|
||||
'XXH' => hash('xxh3', $file['tmp_name']),
|
||||
'XXH' => hash_file('xxh3', $file['tmp_name']),
|
||||
'EXTENSION' => $this->fileExtension($file),
|
||||
'MIME' => $this->fileMIME($file),
|
||||
'DUPE' => false,
|
||||
@ -199,7 +199,7 @@
|
||||
'timestamp' => time(),
|
||||
'useragent' => $USER_AGENT,
|
||||
'ip' => $ip,
|
||||
'ip_hash' => hash('sha1', $_SERVER['REMOTE_ADDR'] . $USER_AGENT),
|
||||
'ip_hash' => hash('xxh3', $_SERVER['REMOTE_ADDR'] . $USER_AGENT),
|
||||
'files_amount' => $files_amount,
|
||||
];
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user