FILE_HASH in config.php
This commit is contained in:
parent
90b48f128b
commit
e23aa7a736
@ -87,6 +87,11 @@
|
|||||||
// For resizing, max values
|
// For resizing, max values
|
||||||
define('THUMB_WIDTH', 200, true);
|
define('THUMB_WIDTH', 200, true);
|
||||||
define('THUMB_HEIGHT', 200, true);
|
define('THUMB_HEIGHT', 200, true);
|
||||||
|
|
||||||
|
// Store image hash in the database for r9k-like boards implementation soon
|
||||||
|
// Function name for hashing
|
||||||
|
// sha1_file, md5_file, etc.
|
||||||
|
define('FILE_HASH', 'md5_file', true);
|
||||||
|
|
||||||
// Maximum image upload size in bytes
|
// Maximum image upload size in bytes
|
||||||
define('MAX_FILESIZE', 10*1024*1024, true); // 10MB
|
define('MAX_FILESIZE', 10*1024*1024, true); // 10MB
|
||||||
|
3
post.php
3
post.php
@ -166,7 +166,8 @@
|
|||||||
error(ERR_MAXSIZE);
|
error(ERR_MAXSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
$post['filehash'] = md5_file($post['file']);
|
$hash_function = FILE_HASH;
|
||||||
|
$post['filehash'] = $hash_function($post['file']);
|
||||||
$post['filesize'] = filesize($post['file']);
|
$post['filesize'] = filesize($post['file']);
|
||||||
|
|
||||||
$image = createimage($post['extension'], $post['file']);
|
$image = createimage($post['extension'], $post['file']);
|
||||||
|
Loading…
Reference in New Issue
Block a user