UploadRcv ActiveX Reference
UploadRcv
ASP Upload receiver component. This ActiveX is used for receiving HTTP file uploads in ASP. To create the object, call Server.CreateObject("Chilkat.UploadRcv"). The Chilkat UploadRcv component is freeware, and is part of the Chilkat Upload freeware ActiveX which provides objects for sending and receiving HTTP file uploads.
Object Creation
(ASP)
set obj = Server.CreateObject("Chilkat.UploadRcv")
Properties
IdleTimeoutMs As Long
A timeout in milliseconds. The default value is 30000. If the upload hangs (i.e. progress halts) for more than this time, the component will abort the upload. (It will timeout.)
LastErrorHtml As String (read-only)
Error information in HTML format for the last method called.
LastErrorText As String (read-only)
Error information in plain-text format for the last method called.
LastErrorXml As String (read-only)
Error information in XML format for the last method called.
NumFilesReceived As Long (read-only)
Number of files received. This property will be set to 0 until the Consume method is called.
NumParams As Long (read-only)
Number of name/value parameters received. This property will be set to 0 until the Consume method is called.
SaveToUploadDir As Long
If 1, received files are saved to the directory indicated by the UploadDir property. The default value of this property is 0.
SizeLimitKB As Long
Sets a limit on the size of individual files. Files exceeding this size limit will not be accepted and the Consume method will return a failed status. The default value is 0, which indicates no size limit.
UploadDir As String
The Consume method will stream received files to this directory.
Methods
Consume() As Long
Consumes an HTTP upload. Files are saved to the UploadDir if the SaveToUploadDir property is set to 1. Otherwise the uploaded files are available in memory via the GetFileData method. Returns 1 for success, 0 for failure.
GetFileData(index As Long) As Variant
Returns the file data for the Nth file received by Consume. (The first file is at index 0.) Returns a zero-length byte array (as a Variant) on failure
GetFileSize(index As Long) As Long
Returns the file size (in bytes) for the Nth file received by Consume. (The first file is at index 0.)
GetFilename(index As Long) As String
Returns the filename of the Nth file received by Consume. (The first file is at index 0.) Returns a null on failure
GetParam(name As String) As String
Returns the value of a parameter (by name) received in the upload. Returns a null on failure
GetParamName(index As Long) As String
Returns the name of the Nth parameter received in the upload. Returns a null on failure
GetParamValue(index As Long) As String
Returns the value of the Nth parameter received in the upload. Returns a null on failure
SaveLastError(filename As String) As Long
Saves the last error information to an XML formatted file.
|