fixed bug in file attachment
This commit is contained in:
parent
f0f7244d84
commit
256750bcb0
|
@ -159,7 +159,9 @@ if ($upload_file && ($_FILES['userfile']['name'] != '')) {
|
|||
|
||||
$filecontent = base64_encode(file_get_contents($_FILES['userfile']['tmp_name']));
|
||||
|
||||
$result_api_call = integria_api_call($config['integria_hostname'], $config['integria_user'], $config['integria_pass'], $config['integria_api_pass'], 'attach_file', [$incident_id, $filename, $filesize, $filedescription, $filecontent], false, '', ';');
|
||||
$filename = str_replace(' ', '+', $filename);
|
||||
|
||||
$result_api_call = integria_api_call($config['integria_hostname'], $config['integria_user'], $config['integria_pass'], $config['integria_api_pass'], 'attach_file', [$incident_id, $filename, $filesize, $filedescription, $filecontent], false, '', '|;|');
|
||||
|
||||
// API method returns '0' string if success.
|
||||
$file_added = ($result_api_call === '0') ? true : false;
|
||||
|
@ -485,4 +487,4 @@ $(document).ready (function () {
|
|||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue