9.5

Table Of Contents
Addfile
Use the addfile request handler to put a document or image file in the document pool.
An addfile request is always a POST request because it uses binary content.
If you send an addfile request to QuarkXPress Server Manager using HTTP or the Web
services interface while the common doc pool switch is set to off in the QuarkXPress Server
Manager client, the file is uploaded to all registered QuarkXPress Server instances. If the
common doc pool is enabled, the file can be uploaded to any one registered QuarkXPress
server instance.
addfile
Namespace
Contains the actual binary content of the file to be
uploaded. This can be a QuarkXPress file, a Word file, a
Binary file or
MIME-type file
uploadfile
Parameters
text file, or a file with a MIME-type such as EPS, JPEG, PNG,
or PICT.
The message "File upload completed."Response
HTTP Error #404The file system
document pool
is not enabled.
Alerts
This alert displays if you attempt to upload a document when the file system
document pool is not enabled.
What to do: Check Enable File System Document Pool in the Server
Configuration dialog box.
HTTP Error #401Incorrect
administration
This alert displays if you specify an invalid administrator user name and password.
realm user name
and password.
What to do: Use the user name and password set in theQuarkXPress Server Manager
client Server Configuration dialog box.
HTTP Error #500Cannot find
required volume
or folder
QuarkXPress Server Error #120
This alert displays if you attempt to upload a document that is in a subfolder that
does not exist in the document pool while Generate Hierarchy on Document
Upload is unchecked in the Server Configuration dialog box.
What to do: Check Generate Hierarchy on Document Upload in the Server
Configuration dialog box.
See Understanding loggingLogs
To post a binary file in the root folder:
http://localhost:8080/addfile/abc.qxp
Example GET
URL
To post a binary file in a subfolder:
http://localhost:8080/addfile/sub1/abc.qxp
Request object name: AddFileRequest
// STEP 1 (COMMON FOR ALL REQUESTS):
com.quark.qxpsm.QRequestContext rc = new com.quark.qxpsm.QRequestContext();
Example, object
model
if(!this.DocumentSettings1.documentName.Text.Equals(""))
rc.documentName = this.DocumentSettings1.documentName.Text;
Stream theStream = uplTheFile.PostedFile.InputStream;
long length = theStream.Length;
Byte[] Buffer = new Byte[length];
A GUIDE TO QUARKXPRESS SERVER 9.5 | 149
USING QUARKXPRESS SERVER