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! |
Join this Rational Talks to You teleconference, featuring Paul Boustany and Mark Krasovich, to speak to the experts about becoming a Rational ClearCase power user. Get a chance to ask your questions and learn tips and tricks for using Rational ClearCase in Agile development FREE! Go There Now!
|
|
|
|
As businesses grow increasingly dependent upon Web applications to provide services to customers, employees and partners, these complex applications become more difficult to secure. Although traditional security solutions protect Internet infrastructure layers, they do not guard against HTTP and HTML attacks. Many organizations that conduct security testing still deploy applications that allow attackers to manipulate their logic and wreak havoc on their business. To mitigate this risk, development and delivery teams must address Web application security throughout the lifecycle, addressing the many layers detailed in this paper. FREE! Go There Now!
|
|
|
|
Visit IBM developerWorks to download a free trial version of Lotus Quickr 8.0, which enables collaboration by transforming the way everyday business content such as documents, rich media, photos, and video can be shared. Lotus Quickr makes it faster and easier to share content of all types (not just documents) within virtual teams. It is designed to make it easier to collaborate across organizational boundaries, while continuing to work within the context of familiar desktop applications. FREE! Go There Now!
|
|
|
|
Download a free trial version of IBM Rational Software Analyzer Developer Edition V7.0 to identify bug defects earlier in the software development cycle. Rational Software Analyzer is an extensible software development solution that reduces the expense of bug-fixes by enabling static analysis code reviews and bug identification very early in the development cycle. FREE! Go There Now!
|
|
|
|
This tutorial shows new users of IBM WebSphere Business Monitor Version 6.0.2 how to perform the "Hello World" equivalent for monitoring business process applications. It is intended to help you get familiar with the capabilities of the product. FREE! Go There Now!
|
|
|
|
Learn how to do more with your reusable assets with the free Rational Asset Manager eKit. The eKit includes demos on how Rational Asset Manager tracks and audits your assets in order to utilize them for reuse. Plus you’ll find white papers and a Webcast that discuss the challenges of a Service Oriented Architecture and how Rational Asset Manager can provide quick and effective solutions. FREE! Go There Now!
|
|
|
|
Get a free trial download of the latest version of IBM Rational Method Composer V7.2 which helps you deliver customized yet consistent process guidance to your project teams and IT organization, and includes the latest version of IBM Rational Unified Process (RUP), which has provided process guidance to teams since 1996. FREE! Go There Now!
|
|
|
|
The Eclipse community is constantly working to extend Eclipse's functionality. In this webcast, learn about some of the most important and feature-rich projects under development. From multi-language support to plug-in development, tune in to see what Eclipse is capable of now. FREE! Go There Now!
|
|
|
|
In this webcast, you'll get an introduction to the eXtreme Transaction Processing (XTP) features of WebSphere Extended Deployment and the common architectural traits required by XTP applications. See how WebSphere Extended Deployment's ObjectGrid feature provides a state-of-the-art infrastructure for hosting XTP applications. FREE! Go There Now!
|
|
|
|
WebSphere Process Server delivers a unique integration framework that simplifies existing IT resources. Often, as IT assets grow to support business demand, so too does their complexity and manageability. In this webcast, we’ll discuss how WebSphere Process Server helps deliver an SOA infrastructure that provides a common model to orchestrate, mediate, connect, map, and execute the underlying IT functions. Discover how WebSphere Process Server simplifies integration of business processes by leveraging existing IT assets as reusable services without the complexities of traditional integration methodologies. FREE! Go There Now!
|
|
|
|
All FREE IBM® developerWorks Tools! |