ASP upload - Pure VB script include for upload files with progress bar | ||
VBScript include file with samples changes (revision history) |
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. | |
FormField | One form field. Member of FormFields collection. | |
FormFields | Contains collection of document fields of files. | |
FormStates | More about state/result of a form process. |
ASPForm - The ASPForm collection retrieves the values of form elements posted to ASP script by a form. | |||||||
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.) |
| ||
<% 'Create upload form 'Using Pure-ASP file upload Dim Form: Set Form = New ASPForm %><!--#INCLUDE FILE="_upload.asp"--><% 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> |
|