- Wed Jul 11, 2018 9:55 pm
#815127
Hi there,
Is there a way to upload files to a case without using an input document via the REST API?
Just like the way files are uploaded in a Grid when in the form/web entry.
i've tried leaving the values empty, but getting a 400 back:
Any help is appreciated.
Thank you.
Is there a way to upload files to a case without using an input document via the REST API?
Just like the way files are uploaded in a Grid when in the form/web entry.
i've tried leaving the values empty, but getting a 400 back:
Code: Select all
$path = $_FILES['file']['tmp_name'];
$type = $_FILES['file']['type'];
$filename = $_FILES['file']['name'];
rename($path, sys_get_temp_dir() . '/' . $filename);
$data = array(
'inp_doc_uid' => '',
'tas_uid' => '',
'app_doc_comment' => '',
'form' => (phpversion() >= "5.5") ? new CurlFile($path, $type) : '@'.$path
);
Any help is appreciated.
Thank you.