Hi
The attachment code is working fine but its creates the file by their own and put the text in it which we give in the below code.
but customer wants to attached the files which are already in the server.
anyone can answer this that how can we upload the files.
=================================================================================
--*****MessageBoundary*****${="\r"}
Content-Disposition:form-data; name="payload"
Content-Type:application/xml; CHARACTERSET=UTF-8
${="\r"}
<attmnt>
<repository id="1002"></repository>
<orig_file_name>attach.txt</orig_file_name>
<rel_file_path>"C:\"</rel_file_path>
<status>Installed</status>
<attmnt_name>attach.txt</attmnt_name>
<description>Upload using REST</description>
<status>INSTALLED</status>
</attmnt>
${="\r"}
--*****MessageBoundary*****${="\r"}
Content-Disposition: form-data; name="attach.txt"; filename="attach.txt"
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary${="\r"}
${="\r"}
testing testing
${="\r"}
--*****MessageBoundary*****--{{CR}}${="\r"}
Attached created attachment with the incident
Original Message:
Sent: Feb 12, 2019 03:04 AM
From: Michael Mueller
Subject: Re: Upload attachment SDM API REST returns BadRequest
I got it,.... finally.
its a bit tricky in postman.
you can specify variables in postman.
I set a variable for the "\r" character in a pre-request script:
and then used this variable in the body wherever I thought it is necessary :
Regards
.............Michael