ASPForm | ||
Class | ||
Member of ScriptUtils Use ASPForm object |
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.) |
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. |
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 |
|
|
|
| ||
<% 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> |