2017

Table Of Contents
USING QUARKXPRESS SERVER
A Guide to QuarkXPress Server 2017 | 169
The following example demonstrates how to use an HTML form to create a POST
request that uses the addfile request handler. The form looks like this:
To use this form:
Enter the name or IP address of the computer on which QuarkXPress Server is
1.
running.
Enter the port number in the port number field.2.
Enter the file name along with the extension in the file field. Click Browse if3.
you need to find the file on your computer. The file will be uploaded with this
name.
Click Submit.
4.
The file uploads to the document pool of the specified server. After the file is
successfully uploaded, the “File upload completed.” alert is displayed.
For example, assume you want to upload a file named “Faces.pdf” (located at the
root of the C drive) to an instance of QuarkXPress Server running at IP address
202.201.92.34 and port 8080, and that you want the name of the uploaded file on
the server to be “NewFaces.pdf.” Here’s how you would accomplish this in the
HTML form:
The HTML code to generate the above sample file is as follows:
<HTML>
<HEAD>
<TITLE>Test Addfile</TITLE>
<SCRIPT LANGUAGE=”JavaScript”>
function UploadDocument() {
var URL;
URL = “http://” + UploadForm.MachineIP.value + “:” +
UploadForm.Port.value + “/addfile/” +
UploadForm.NewName.value;
UploadForm.action = URL;
}
</SCRIPT>
</HEAD>
<BODY>
<FORM ID=”UploadForm” METHOD = “post” ENCTYPE=”multipart/form-
data”