Http://soft.huweishen.com/soft/47.html
AspUpload for ASP programmer to realize ASP website File Upload function It is the first choice. This article will introduce you to the installation and use of AspUpload components, which also comes with the aspupload installation of frequently asked questions and an example of using AspUpload to implement file upload.
Introduction to Components:
ASP uploads components that enable the following functions:
A. Restricting the size of uploaded files
B. Setting permissions for a user
C. Modifying file properties
D. Uploading multiple files at the same time
E. Ability to save files to the database
F. Support file deletion, automatically generate files with different names on the server
G. Users with administrative privileges can even use the control for remote registration
1, the installation of AspUpload:
1) Download the software, software:http://www.027down.com/view/540.html .
2) After the download is complete, extract to any folder, click "AspUpload 3.0.0.6.exe" to activate the installation Wizard to start the installation, AspUpload installation is very simple, the following simple to put a few installation diagram:
Figure One: The installation Wizard starts
Figure II: Enter the registration code, see "!" Registration code. TXT "file
Figure Three: Installation progress display, during installation will be prompted to restart under IIS
Figure IV: Installation complete
2, AspUpload installation of common errors and solutions:
1) "The server may not have the component installed" error when "Aspupload3.0 component upload is not supported" appears:
A, reason: the server may not support aspjpeg components and watermark pictures.
Workaround: Login to the background, click "Basic Settings"-"Upload Settings", set "Select Generate Preview Picture component" to "off", and then set the "Picture watermark setting switch" to "Turn off watermark effect". Uploading a picture again may solve your problem.
B. Cause: May be a problem with the AspUpload component.
Workaround: 1, try reinstalling the software on the server.
2, the update program used in the file upload components, such as no group upload method.
2) Error "No permission Call component" appears:
Cause: It is possible that your IIS has no permissions to invoke the AspUpload component.
Workaround: Log on to the server, locate the "AspUpload.dll" file in the installation directory, assign it the ' Read and run ' permission for the IIS user group, and it should be possible to resolve this issue.
Second, use the AspUpload component upload instance:
In fact, the use of AspUpload components to achieve file upload is very simple, only need to make good use of its methods can be, the following for everyone simply wrote an upload instance:
<!--#include file= ' conn.asp '-
<!--#include file= ' ubb.asp '-
<%
Set upfile = Server.CreateObject (' Persits.upload.1 ')
fw_size=512000
Server.scripttimeout=60
Dim filee,rannum,imgurl,img_name,fw_sort,fw_sppd
Fspath=server.mappath ('./') & ' \upload\ ' picture-stored folder
Upfile. Save ' Upload loaded memory
For each of the File in Upfile. Files ' displays a list of uploaded documents
Fit=lcase (file.imagetype) ' Read picture type
If fit= ' unknown ' then fit= ' is not a picture type
If fit<> ' gif ' and fit<> ' jpg ' and fit<> ' then ' file type judgment
Set upfile=nothing
Response.Write ' <script language=javascript> '
Response.Write ' Alert (' We only support uploading GIF or JPG image files! '); '
Response.Write ' Javascript:history.back (1); '
Response.Write ' </script> '
Response.End
End If
If file.size >fw_size then ' file size judgment
Set upfile=nothing
Response.Write ' <script language=javascript> '
Response.Write ' Alert (' The file you uploaded exceeds our limit, max ' &fw_size/1024& ' k! '); '
Response.Write ' Javascript:history.back (1); '
Response.Write ' </script> '
Response.End
End If
Next
For each of the File in Upfile. Files ' Start uploading file
Filee=lcase (file.imagetype) ' Read picture type
Set Ofile=upfile.files (File.name)
If filee<> ' Then ' picture is not empty when writing
Randomize
Rannum=int (90000*RND) +10000
Filename= ' Guest_ ' &year (now) &month (now) &day (now) &hour (now) &minute (now) &second (now) & rannum& '. ' &filee
Ofile.saveas Fspath&filename
imgurl=imgurl+filename& '; '
End If
Set ofile=nothing
Next
' Add upload information here
Sql= ' select * from house '
Rs.Open sql,conn,1,3
Rs.addnew
RS (' MyType ') =upfile.form (' MyType ')
RS (' Imgurl ') =imgurl
Rs.update
Rs.close
Response.Write ' <script language=javascript> '
Response.Write ' Alert (' success of Information release '); '
Response.Write ' window.location= ' index.asp '
Response.Write ' </script> '
%>
Introduction to installation and use of AspUpload components