Date: Fri, 29 Mar 2024 02:15:48 -0700 (PDT) Message-ID: <1390182867.1083.1711703748629@ip-172-30-17-85.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1082_1097348808.1711703748621" ------=_Part_1082_1097348808.1711703748621 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The EWAttach operation attaches a file to a field in a record; the file is passed = in the body of the request, and the URL must specify the record ID, the nam= e of the field, and the file name to assign to the file.
Browsers do not support sending PUT requests. This REST operation = is intended for the use of application clients. If you need to attach a fil= e from a browser, use the regular POST requests with EWCreate or EWUpdate o= perations, and specify enctype=3D"multipart/form-data" in the browser HTML form.
Assume an instance of Agiloft is available on localhost, port= 8080 and is called "Demo". Attach a file to the field "someField" in recor= d 1234 of table "someTable" with a file name as testfile.zip.
The request has to be issued via the PUT HTTP method where the body cont= ains the content of the file to be attached.
https:/= /localhost:8080/ewws/EWAttach?$KB=3DDemo$table=3DsomeTable&$login=3Dadm= in&$password=3Dqwerty&id=3D1234&field=3DsomeField&fileName= =3Dtestfile.zip
The following result will be returned when the file is attached: = p>
EWR= EST_someField.length=3D'1';
<form= method=3D"post" action=3D"https://demo.agiloft.com/ewws/EWCreate" enctype= =3D"multipart/form-data"> <input name=3D"$KB" value=3D"Demo" /> <input name=3D"$table" value=3D"case" /> <input name=3D"$lang" value=3D"en" /> <input name=3D"$login" value=3D"admin" /> <input name=3D"$password" value=3D"qwerty" /> <input type=3D"file" name=3D"inbound_attachments"/> <input type=3D"submit" value=3D"submit" /> </form>