Pcdaspfileupload – Kofax DM API User Manual
Page 65
DM API O
BJECTS
45
PCDASPFileUpload
PCDASPFileUpload is a helper class/interface/object that supports the
tying of the
POST
of an ASP Multipart/Form file into a
(The
GET
method is not supported in PCDPutStream, so always use
POST
.) It handles all the parsing of headers from the body content and
streaming of the file that is to be uploaded into the DM
object.
method initializes the COM interface pointers to all
of the ASP objects, such as Session, Application, Request, Response,
and Server. These are passed by the ASP engine from the interface
pointer.
method reads from the ASP Request object that is
. It uses the
ReadBinary
method to write
to the
object that the server supplies.
method can be used to determine if the body of the
content is empty, which would indicate that a zero-byte file was sent.
looks at the posted stream, parses out the header, and
determines if the document being sent is empty. If the content is empty,
the success return value is set to
TRUE
, and the error state is set to
PCD_ERR_ZERO_BYTE_UPLOAD
. If the body content is not empty, the
success return value is set to
FALSE
, and no error condition is set.
method releases all the interface pointers acquired
during the
initialization and resets the error state.
Example
The following is an example of creating an instance of the
PCDASPFileUpload.
.
.
.
Dim pFile As Object
.
.
.
pFile = _
Server.CreateObject("PCDClient.PCDASPFileUpload”
)