Various ways to implement file upload (upload) using ASP

Source: Internet
Author: User
Tags http file upload
When the user needs to transfer files to the server, the common method is to use FTP, although the transmission is stable with FTP, but security is a serious problem, and the FTP server read user library access permissions, so that users are still not easy to use. If we can integrate the file upload function with the web, so that users can complete the upload task with only a Web browser, this will be very convenient for them.

There are many ways to introduce ASP upload file on the network, it boils down to have the following three kinds of realization method, the reader can choose the appropriate method according to the condition and the demand of own website.

One, the server component uploads the way:

This method is represented by Sa-fileup components, aspupload components, and lyfupload components.

Software Artisans's sa-fileup is one of the first commercially Active server components that has been improved and now exists as a pure ASP component. The aspupload of Persits software is also a powerful COM component. They all have the ability to upload a variety of file uploads: uploading large files, restricting the size of uploaded files, uploading multiple files, displaying upload progress bars, and being able to save files to a database 、......。

  The advantage of this method is that it is stable, powerful and has no requirements for browsers. The disadvantage is that you need to register the components on the server. If the site administrator has administrative privileges on the server, the method should be the preferred way to implement file uploads.

second, no component upload mode:

This method is represented by transformation without component uploading, without fear and without component uploading, and pioneer without component uploading.

This method is the most widely used method on the network, and there are many examples of application of the source code, the advantages of the server and browser are not any requirements, adaptability, wide range of applications. However, it also has a disadvantage that there is no progress bar displayed when uploading files, and the IIS default restrictions do not allow files exceeding 200KB to be uploaded (unless you modify the default settings for IIS aspmaxrequestentityallowed).

  If you only need to upload small files, you should be the preferred option. If you need to upload a large file, you need the site administrator to modify the default settings for IIS aspmaxrequestentityallowed.

third, browser components upload mode:

This method is represented by Xupload components, xuploadfiles components, and vertical and horizontal HTTP file upload components.

This method is relatively less applied to the network, the advantage is that there is no requirement for the server, no need to install components on the server, and can provide the various functions required for file upload: Uploading large files, restricting the size of uploaded files, uploading multiple files, displaying upload progress bars 、......。 The disadvantages are also obvious and need to register the browser component (on the client). This method applies to situations where a site administrator does not have administrative privileges on a server (such as a virtual host, leased space, and so on) that requires uploading large files.

Various upload methods compare results horizontally:

The the The
server requiresbrowser to require uploading files to limitupload when there are no progress bar other
Sa-fileup Installing components - Support for large files, unlimited There's a progress bar. Need to have server control
AspUpload Installing components - Support for large files, unlimited There's a progress bar. Need to have server control
Lyfupload Installing components - Support for large files, unlimited No Need to have server control
Transformation No component Upload - - Associated with IIS settings,
IIS default setting of Max 200KB
No General
Suitable for small file uploads
No Fear no component upload - - Associated with IIS settings,
IIS default setting of Max 200KB
No General
Suitable for small file uploads
Pioneer without component upload - - Associated with IIS settings,
IIS default setting of Max 200KB
No General
Suitable for small file uploads
Xuploadfiles - Installing components Support for large files, unlimited There's a progress bar. Rented space,
and need to upload large files
Horizontal HTTP File
Upload Component
- Installing components Support for large files, unlimited There's a progress bar. Rented space,
and need to upload large files

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.