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.
This commit is contained in:
hatstand0 2014-09-26 00:09:14 +10:00 committed by czaks
parent 7ea5b129e6
commit d27cddaacc

View File

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