- $res = jirafeau_upload($_FILES['file'],
- isset($_POST['one_time_download']),
- $key, $time, get_ip_address($cfg),
- $cfg['enable_crypt'], $cfg['link_name_length']);
+ // Check if one time download is enabled
+ if (!$cfg['one_time_download'] && isset($_POST['one_time_download'])) {
+ echo 'Error 26: One time download is disabled.';
+ exit;
+ }
+
+ if ($cfg['store_uploader_ip']) {
+ $ip = get_ip_address($cfg);
+ } else {
+ $ip = "";
+ }
+
+ $res = jirafeau_upload(
+ $_FILES['file'],
+ isset($_POST['one_time_download']),
+ $key,
+ $time,
+ $ip,
+ $cfg['enable_crypt'],
+ $cfg['link_name_length'],
+ $cfg['file_hash']
+ );