|
@ -92,7 +92,6 @@ class Api { |
|
|
global $config; |
|
|
global $config; |
|
|
|
|
|
|
|
|
$this->translateFields($this->fileFields, $file, $apiPost); |
|
|
$this->translateFields($this->fileFields, $file, $apiPost); |
|
|
$apiPost['filename'] = @substr($file->name, 0, strrpos($file->name, '.')); |
|
|
|
|
|
$dotPos = strrpos($file->file, '.'); |
|
|
$dotPos = strrpos($file->file, '.'); |
|
|
$apiPost['ext'] = substr($file->file, $dotPos); |
|
|
$apiPost['ext'] = substr($file->file, $dotPos); |
|
|
$apiPost['tim'] = substr($file->file, 0, $dotPos); |
|
|
$apiPost['tim'] = substr($file->file, 0, $dotPos); |
|
@ -102,6 +101,12 @@ class Api { |
|
|
if(isset($file->thumb) && $file->thumb == 'spoiler') |
|
|
if(isset($file->thumb) && $file->thumb == 'spoiler') |
|
|
$apiPost['spoiler'] = 1; |
|
|
$apiPost['spoiler'] = 1; |
|
|
|
|
|
|
|
|
|
|
|
if (isset($this->config['show_filename']) && $this->config['show_filename']) { |
|
|
|
|
|
$apiPost['filename'] = @substr($file->name, 0, strrpos($file->name, '.')); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
$apiPost['filename'] = substr($file->file, 0, $dotPos); |
|
|
|
|
|
} |
|
|
if (isset ($file->hash) && $file->hash) { |
|
|
if (isset ($file->hash) && $file->hash) { |
|
|
$apiPost['md5'] = base64_encode(hex2bin($file->hash)); |
|
|
$apiPost['md5'] = base64_encode(hex2bin($file->hash)); |
|
|
} |
|
|
} |
|
|