summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorhatstand0 <hatstand0@gmail.com>2014-09-26 00:09:14 +1000
committerczaks <marcin@6irc.net>2014-09-26 13:28:04 +0200
commitd27cddaaccc68eaa1b37b3a0694ba3e40a8fe049 (patch)
tree538e5c4ac76a3e0468d48ff5d55dcad891beee0b /inc
parent7ea5b129e6ea03cabdbd67e566f0e352486cdd30 (diff)
Add file hash to API
The API currently lacks the Base64 encoded file hash 4chan's API provides, which assists in file de-duplication by archive software.
Diffstat (limited to 'inc')
-rw-r--r--inc/api.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/inc/api.php b/inc/api.php
index d7b28ee9..3769a9c9 100644
--- a/inc/api.php
+++ b/inc/api.php
@@ -113,6 +113,7 @@ class Api {
$apiPost['ext'] = substr($file->file, $dotPos);
$dotPos = strrpos($file->file, '.');
$apiPost['tim'] = substr($file->file, 0, $dotPos);
+ $apiPost['md5'] = base64_encode(md5_file($file->file_path, true));
}
return $apiPost;