6.3.2 SA-FileUP component
On many Web sites, a common requirement is that the server can receive files sent by clients? In IIS 4.0, Microsoft provides a component named Posting Acceptor to complete this task. This component is not available in standard installation of IIS 5.0 and ASP 3.0. If Site Server Express is installed, you need to include this component. You can download this package from the Microsoft Web site http://www.microsoft.com/windows/software/webpost/post_accept.htm.
However, many people find that the Posting Acceptor component has functional limitations and is difficult to program. A popular alternative is the SA-FileUP component from the Software Artisans. Unlike the Posting Acceptor component (which is only an ISAPI filter), the SA-FileUP component is a real ActiveX DLL server component that is easy to integrate into ASP web pages. This means that you can use the same technology for setting page security protection and restricting user access on other ASP pages or components. This component can also be run in the MTS/COM + environment.
The SA-FileUP component tutorials can be found at http://www.activeserverpages.com/upload/site, so only a result is provided here. The examples in this chapter contain the sample page for using this component (in the SAFileUP subdirectory under the Chapter06 directory). You can learn how to use this component. If necessary, download the Beibei of sa-fileupfrom the Software Artisans website http://www.softartisans.com.
Use the SA-FileUP component
The sample page of the SA-FileUP component creates a simple page that contains a FileUpload element and a button, and uses the html input element, as shown in Figure 6-28:
Figure 6-28 sample page for using the SA-FileUp component
<Form action = "safileup_response.asp"
ENCTYPE = "MULTIPART/FORM-DATA" METHOD = "POST">
...
<Input type = "FILE" NAME = "FILE1">
...
<Input type = "SUBMIT" NAME = "SUB1" VALUE = "Upload File">
...
</FORM>
When a user submits a form, the content is transmitted to the server, and a component instance is created on the ASP page, and information is uploaded to the server. Later, the component returns the data of a series of uploaded files with descriptions, as shown in Figure 6-29:
Figure 6-29 results of using the SA-FileUP component
The SA-FileUP component reads the file and stores it on the server as a standard disk file or binary database data. With it, you can use ASP to control the upload process, limit the size of the uploaded file, or even delete the uploaded file, and dynamically change its name and location.
6.3.3 RegEx registry access component
A sample component provided by Microsoft IIS 4.0 can access the system registry on the server. This feature helps check the version of software such as installed, or the parameters used by IIS and the operating system.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service