Lots of emails, forum posts and newsgroup posts are about uploading files and pictures from a web site. This is one of thetop search items on ASPFree.com.There are plenty of good upload components, (
SA-Fileup is the best one I've used, ASPSmartupload is the best free one I've used).
SA-Fileup provides many advanced features in their component. Paying for it is well worth if your in a corporate, enterprise or large scale solution. Using components such as ASPSmartupload to do nothing more to give the capability of uploading and having mixed forms is sufficient. They provide working examples and are easy to implement.
Step 1. Download a component and install on the server. (For this article we chose ASPSmartUpload install documentation)
Step 2. Create a page with a form with the <form enctype="multipart/form-data" method="post" action="somfile.asp" name="form1">
Step 3. Create a textbox inside the form with the type of File. This will automatically put the button by the text box. The form below demonstrates what is need to be inside your .asp page.
How to setup a form and textbox to prepare for a person to upload a file
<form enctype="multipart/form-data" method="post" action="somfile.asp" name="form1">
<table width="80%">
<tr>
<td align=right>
<font face="Arial, Helv"><b>File to Upload</b></font>
</td>
<td>
<input type="file" name="item" size="30">
</td>
</tr>
</table>
<table border=0 bgcolor="#CCCCCC" cellpadding=3 cellspacing=3>
<tr>
<td colspan="2">
<input name="btnSubmit" type="Submit" value="Submit">
</td>
</tr>
</table>
</form>
|
Setup Instructions Last modified: August 1st, 1999 © 2000 Advantys. All rights reserved. |
To download ASPSmartUpload Click here
Overview
The installation of aspSmartUpload can be broken down into four main stages :
- extract the downloaded file
- saving the aspSmartUpload.dll file on the NT server
- add the aspSmartUploadUtil.dll fils in the NT server Path
- install the samples
These four stages are fully described below.
Configuration required
Server :
- 300Ko of free disk space
- Windows NT 4 Service pack 3+, Microsoft IIS 4
or Windows 95+, Personal Web Server, ASP
or Windows 2000
For Microsoft IIS 3 users :
+ VB5 Runtime
+ asp.dll (version 1.0b+) : http://www.microsoft.com/office/intranet/modules/asp411s3.asp
Browser :
Your browser must be RFC 1867-compliant to be able to upload files.
Netscape 3+ and Microsoft IE 3.02+ accept the RFC 1867.
Stage 1 : Extract the downloaded file
All the aspSmartUpload files are supplied in the zipped file, aspSmartUpload.zip.
Extract aspSmartUpload.zip to a temporary directory, making sure the directory structure remains intact. If, for example, you extract the file to \temp, you should see the following :
Stage 2 : Install aspSmartUpload.dll
You have to register aspSmartUpload.dll on your server. The dll can be registered by using either Regsvr32.exe OR Microsoft Transaction Server (MTS).
1st Solution: Using RegSVR32
Copy aspSmartUpload.dll into a directory on the NT server (e.g. c:\mydir).
Save the component using the commands :
REGSVR32.EXE c:\mydir\aspSmartUpload.dll (From DOS or the Start/Run prompt)
2nd Solution: Using Transaction Server
Select the NT server on which you wish to install aspSmartUpload.
Create a new batch.
In the component folder, create a new component called aspSmartUpload.
Paste aspSmartUpload.dll to the Transaction Server to save it.
Stage 3 : Install aspSmartUploadUtil.dll
The objective is to enable the Operating System to access the aspSmartUploadUtil.dll file.
There is two ways to archieve this :
- Copy aspSmartUploadUtil.dll in the c:\winnt\system32 directory. That way you don't have to update the PATH propertie.
- Copy aspSmartUploadUtil.dll into a directory on the NT server (e.g. c:\mydir).
Add the component directory in the PATH using the commands :
PATH=%PATH%;c:\mydir (From DOS)
Stage 4 : Install samples
Installation
The ASP application must be installed in an ASP-script-enabled web directory.
If your site has the following structure :
\inetpub
\inetpub\scripts
\inetpub\wwwroot
Copy the
\temp\aspSmartUpload\MyInetpub\scripts\aspSmartUpload directory
to the
\inetpub\scripts directory on your server.
Copy the
\temp\aspSmartUpload\MyInetpub\wwwroot\aspSmartUpload directory
to the
\inetpub\wwwroot directory on your server.
Test
Using your browser, enter the following addresses :
http://your_web_server/aspSmartUpload/default.htm
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |
More ASP Code Articles
More By aspfree
developerWorks - FREE Tools! |
Poor Requirements Management capabilities in an Enterprise have been linked to excessive project failures, escalating IT costs, and failure to deliver competitive advantage into the marketplace. Join Brianna M Smith from IBM Rational and learn about how successful organizations align IT and Business stakeholders through collaborative processes and tools for effective requirements management, and how an integrated approach across the IT lifecycle can provide unparalleled visibility and traceability to ensure that project teams are delivering on the business vision by "doing the right things" and "doing things right." FREE! Go There Now!
|
|
|
|
Visit IBM developerWorks to download a free trial version of WebSphere Business Modeler Advanced V6.1.1, IBM’s premier business process modeling and analysis tool for business users that offers process modeling, simulation, and analysis capabilities. IBM WebSphere Business Modeler helps you visualize, understand, and document business processes for continuous improvement. FREE! Go There Now!
|
|
|
|
Download a free trial version of IBM DB2 9.5 for Linux, UNIX, and Windows. DB2 9 is the result of a five-year development project that transformed traditional (static) database technology into an interactive data server that merges the high performance and ease of use of DB2 with the self-describing benefits of XML. FREE! Go There Now!
|
|
|
|
Download a free trial version of IBM Rational Developer for System z, software that can help you deliver core development capabilities; the power of Java Platform, Enterprise Edition (Java EE); and rapid application development support to diverse enterprise application development teams. With comprehensive development tools to help create, deploy and maintain traditional enterprise and composite applications, Rational Developer for System z enables developers with different technical backgrounds to easily participate in important technology projects. FREE! Go There Now!
|
|
|
|
Visit IBM developerWorks to download a free trial of the latest release of IBM Lotus Sametime Standard V8.0. Lotus Sametime Standard V8.0 is a platform for unified communications and collaboration that combines security features with an extensible, open solution including integrated Voice over IP, geographic location awareness, mobile clients, and a robust Business Partner community offering telephony and video integration. FREE! Go There Now!
|
|
|
|
Download a free trial version of IBM Rational Developer for System i V7.1, which provides a complete development environment for traditional i5/OS application development. IBM Rational Developer for System i is a new eclipse-based workstation offering for i5/OS application development that provides a comprehensive Integrated Development Environment for edit/compile/debug of traditional RPG/COBOL/C/C++ i5/OS applications. FREE! Go There Now!
|
|
|
|
Join this webcast to discover the key requirements for successful change and release management. Learn how to extend your .NET environment to improve productivity and collaboration, and address core problems afflicting team development. In this webcast, we’ll review typical challenges faced by customers and how to resolve them with the IBM Rational Change and Release Management solution, including Rational ClearCase, Rational ClearQuest and Rational Build Forge. Replay is available for 9 months. FREE! Go There Now!
|
|
|
|
Join this webcast to learn how IBM Rational's Functional Testing solution enables you to implement automation your way, at your pace, with your existing staff. In this webcast, you’ll learn how you can eliminate redundancy of manual test scripts, reduce errors, and increase test coverage through test automation. After this presentation you will understand how IBM Rational Functional Testing solution can streamline your manual testing and make test automation easily attainable. FREE! Go There Now!
|
|
|
|
Explore how Rational and WebSphere software enable enterprise documentation in SOA environments. Specifically, a new integration between IBM WebSphere® Business Modeler and IBM Rational® Method Composer software can help technical writers more easily keep enterprise operations manuals in sync with changes that are made to business processes, resulting in more accurate and timely documentation that benefits the entire enterprise. FREE! Go There Now!
|
|
|
|
The unprecedented scope of a service-oriented architecture (SOA) initiative brings to the forefront a number of management and governance issues that were sidestepped in the past. The key to a successful SOA implementation is managing and governing activities throughout the entire SOA delivery lifecycle by ensuring that services conform to the needs of all of the business’s stakeholders. Learn how service lifecycle management allows the business to ensure that the process by which services are defined, created, tested, deployed, optimized and retired is manageable, repeatable and auditable. FREE! Go There Now!
|
|
|
|
All FREE IBM® developerWorks Tools! |