you can use CFLOOP and loop the CFFILEs to streamline the code as well.

-----Original Message-----
From: Peter Amiri [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 01, 2001 5:18 PM
To: CF-Talk
Subject: RE: Batch Image Upload


Jason,

You can do this with a HTML form. Look at the code below which shows how to
upload three files at a time via the browser to you web server.

<cfif isDefined("Upload")>
        <cffile
                action="UPLOAD"
                filefield="theFile1"
                destination="C:\upload\"
                nameconflict="ERROR">
        <cffile
                action="UPLOAD"
                filefield="theFile2"
                destination="c:\upload\"
                nameconflict="MAKEUNIQUE">
        <cffile
                action="UPLOAD"
                filefield="theFile3"
                destination="c:\upload\"
                nameconflict="MAKEUNIQUE">
</cfif>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
        <title>Untitled</title>
</head>

<body>
<form action="upload.cfm" method="post" enctype="multipart/form-data">
File 1:<input type="File" name="theFile1"><br>
File 2:<input type="File" name="theFile2"><br>
File 3:<input type="File" name="theFile3"><br>
<input type="Submit" name="Upload" value="Upload">
</form>

</body>
</html>


That should do it for you. Just expand the sample to ten files and you
should be done.

-Peter Amiri

> > -----Ursprüngliche Nachricht-----
> > > Von: Jason Larson [mailto:[EMAIL PROTECTED]]
> > > Gesendet: Donnerstag, 1. Februar 2001 17:35
> > > An: CF-Talk
> > > Betreff: Batch Image Upload
> > >
> > >
> > >
> > > I was wondering if anyone has a custom cf tag, or some ideas to
> > > accomplish a
> > > batch image upload. I have a client that will be taking about 10
> > > pictures a
> > > day on 10 different construction projects. They want to have the
> > > capability
> > > to upload the images in a batch process without using a FTP
> > > utility, for the
> > > sake of saving time. I have been brewing this over the last
> > couple of days
> > > and any suggestions on how to accomplish this would be of great help.
> > >
> > > Thanks
> > >
> > > Jason Larson
> > > [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to