ASPForm

          Class 
          Member of  ScriptUtils Use ASPForm object 

Description
The ASPForm collection retrieves the values of form elements posted to ASP script by a form using the POST method. ASPForm can process multipart/form-data or application/x-www-form-urlencoded data with length up to 2GB.
Initialization and usage of Huge-ASP upload in several programming environment - ASP/VBS, VBA (5.0, 6.0), C++, C# and ASPNet (ASPX).
Technical details about progress bar indicator.
Brief overview of work with very large files. ASPForm configuration and IIS setting for huge uploads or urlencoded forms with big fields.
Object model
ASPForm - The ASPForm collection retrieves the values of form elements posted to ASP script by a form using the POST method. ASPForm can process multipart/form-data or application/x-www-form-urlencoded data with length up to 2GB.
 
FormFields - Contains collection of document fields of files. (Items property, Collection of all form fields (plain form fields and files))
 
 
FormField - One form field. Member of FormFields collection. (Item property, Returns a specific member of a FormFields collection either by position or by key.)
 
FormFields - Contains collection of document fields of files. (Files property, Collection of all files in the source document.)
 
FormFields - Contains collection of document fields of files. (Texts property, Collection of all fields except files in the source document.)
Methods
CheckRequirements Returns basic info about upload configuration - user running ASP, temp folder and its size, timeouts, memory storage size and info about expiration.
Read Reads source form data from the client using Request.BinaryRead
You can use this method to cause ASPForm read source data in special error cases, especially when fsSizeLimit error occurs. You can read part of source data with first n fields
StringToBinary Converts UNICODE string (BSTR or String type) to binary data (VT_ARRAY | VT_UI1) using specified windows code page or character set.
Properties
FormType Returns form type for parsed data.
eFormType, RW
CharSet String or numeric (ConvertCodePages) expression that describes the character set used for conversion of a source request data to a string. If no value is supplied, source form string data are interpreted using ANSI codepage.
ConvertCodePages, RW
ChunkReadSize Specifies length of blocks readed from the client. ASPForm will read data source data using Request.BinaryRead(ChunkReadSize) method.
Long, RW
MaxMemoryStorage Maximum size of source data stored in memory.
- Source data with size less than MaxMemoryStorage are stored in memory.
- Data are stored in Temp folder (ScriptUtils.ASPForm.TempPath) if the source data size exceeds this value.
Long, RW
ReadTimeout Specifies the maximum amount of time (in seconds) a upload can process before it is terminated.
Long, RW
SizeLimit Maximum size of source form to read.
Long, RW
TempPath Path to store form data during read of form (upload) on server-side.
String, RW
ThreadPriority Let's you specify priority value of the ASP thread which will read form data from a client.
ThreadPriorities, RW
UploadID Lets' you access this asp form from another thread (another ASP script) in the same application using this ID.
Long, RW
BytesRead Number of bytes that are already readed during upload.
Long, RO
Files Collection of all files in the source document.
FormFields, RO
getForm Form with the same ID in this ASP application.
ASPForm, RO
Items Collection of all form fields (plain form fields and files)
FormFields, RO
NewUploadID Let's you specify unique Upload ID.
Long, RO
ReadTime Read data time in milisecond.
Long, RO
SourceData Returns source document (multipart or url encoded data). Let's you work with source data as block of memory.
Variant, RO
State Result of source data reading.
FormStates, RO
Texts Collection of all fields except files in the source document.
FormFields, RO
TotalBytes Total size of the Request data (Same as Request.TotalBytes)
Long, RO
Examples
 Upload - Send an email with attachment  
 Upload - Use ASPForm object in VB6 class  
 ASP Form - process standard x-www-form-urlencoded data with unicode code page and unlimitted size.  
 Upload - Simple upload  
<%
  Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm")
  If Form.State = 0 Then
    Form.Files.Save "C:\Uploads"
  Else 
    'Handle other form states.
  End If
%>

<Body>
<form method=post ENCTYPE="multipart/form-data">

<input type="submit" value="Upload the files >>"><br>
<Div ID=files>
 File 1 : <input type="file" name="File1"><br>
 File 2 : <input type="file" name="File2">
</Div>
<Input Type=Button Value="+Add a file" OnClick=Expand()>
<Script>
  var nfiles = 2;
  Function Expand(){
    nfiles++;
    files.insertAdjacentHTML('BeforeEnd','<BR> File '+nfiles+' : <input type="file" name="File'+nfiles+'">');
  }
</Script>
</Body>
Used in
PureASP upload, HugeASP upload or ASPNet HTMLInputForm? Results of performance tests.
Personal notes, requirements, differences between pureasp upload script and hugeasp upload component, pureasp upload implemented classes, methods and properties.
Technical details and problems with UploadReadAheadSize IIS property for advanced users. Detailed explanation of communication between client browser and IIS server with several configuration values.
Monitoring of upload results, problem with UploadReadAheadSize and 'friendly' http error messages from Internet Explorer.
  Other links for ASPForm class
ScriptUtilities and Huge ASP file upload classes
      Easy to use, hi-performance ASP file upload component with progress bar indicator. Let's you upload multiple files with size up to 2GB to a disk or database along with another form fields. Works with large posts, any character set (including unicode utf-8). Contains one-click multiple files/folders download with on-the-fly compression (Using BinaryWrite/BinaryRead).
      Hi-performance text file logging for ASP/VBScript/VBA applications. Lets you create daily/weekly/monthly log files with variable number of logged values and extra timing and performance info.
       Lets you work with safearray binary data in VBS/JS. It also enables conversion between binary and String data using several code pages. ZLib compress and uncompress functions. Lets you transfer files using compressed stream from a client to server using IE.
      This library also enables calling of some Kernel and Advapi functions (performance, timing, sleep, configuration ...) and enables native work with INI files.


© 1996 – 2005 Motobit Software, help{at}pstruh.cz, help v. 2.16.14