ASP Components | no component upload

Source: Internet
Author: User
Tags file upload save file

ASP Components | no component upload

Last Updated: 2006-08-25 21:22

Pure javascript to build ASP upload components, supporting multiple file upload, progress bar, database storage and file system storage

Component Download address (sync for easy version, no attachments uploaded here):
HTTP://WWW.ZOPE.ORG/MEMBERS/RIMIFON/FYUPLOAD.SCT (right click to download)

Related instructions:
have component uploadRight-click "FYUPLOAD.SCT" to register, and then you can use:
Server.CreateObject ("Rimifon.upload")
Creates an object.
No component uploadWay please use
GetObject ("script:" + component Address)
Create the object, the component address is the hard drive absolute path, or you can use the HTTP full path.
==============================================
properties and Method descriptions:
Set page character encoding: Upload.charset = "UTF-8"//default to GB2312 encoding.
File size limit: upload.maxsize = 1024 * 512//Set upload size is no more than KB, the parameter is zero do not limit the size of the upload file (default is 0).
File type limit: Upload.filter = "RAR|ZIP|TXT|GIF|JPG|BMP|HTM|HTML|SWF|MHT"; (default) Sets the type of document that is allowed to be uploaded, using null values without restricting the upload file type.
Get the client path to the uploaded file: Upload.field. The input box name. FilePath
Get the file name of the uploaded file: Upload.field. The name of the input box. SourceName
Get file name saved after uploading files: Upload.field. Enter the name of the box. FileName
Get the MimeType:Upload.Field of the uploaded file. The name of the input box. FileType
Get the actual size of the uploaded file: Upload.field. The input box name. FileSize
Get upload file rejected message: Upload.field. Enter the name of the box. Message
Get form data: Upload.field. Enter the name of the box. Value//If it is a file, return the Unicode encoded content of the file
Specifies the size of the upload buffer and reads the upload data: upload.readform (buffer size [bytes], parameter II)//default to all buffers, recommended under 200k ( can solve the problem of 2003 can not upload large filesTo provide the application data for the upload of the progress bar.
Save file to specified directory: Upload.savefile ("Save Directory")//default view current directory
Simplified text element data reading: upload.form (input box name); Will Upload.field. The input box name. Value is simplified to a habitual method and resolves the "nonexistent attribute" error when VBS calls.
==============================================

Demo: Http://www.fengyun.org/Test/NetDisk

Brief code example:
Set Upload = Server.CreateObject ("Rimifon.upload")
Upload.readform 204800
' Storage File system:
Upload.savefile "Upload"
' Storage database:
' Rs (0). AppendChunk upload.form ("File1")
Upload.dispose
Set Upload = Nothing

Update records:
[06-07-31] will upload.field["Test". Value is simplified to upload.form ("Test")
[06-08-01] Modifies the Upload.form method and returns the Upload.field["Test" Object if it is a file
[06-08-02] Modifies the Upload.form method and returns the value after no property
[06-08-10] Specifies the CLSID at the time of registration so that the correct common type library can be generated
[06-08-23] Fixed a bug in which VBS cannot enumerate form elements
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.