There are a number of Java multi-file uploaders you may want to look at,
e.g. http://www.radinks.com/upload/index.php?gg2 (this is just the first I
found). One advantage with one at a time is it may be easier to collect all
the details about the image at the same time. You'd probably need this
screen with editing images and details anyway, right?

BTW I run a CF-based hiking site too: http://www.tramper.co.nz/ . Doesn't
have individual user image galleries yet, but I'm planning on adding that
soon.

> forcing users to zip their pictures into a single archive,

This might be nice as an option, but I think you should let users upload one
at a time the old fashioned way as well. The biggest problem might be your
page timing out. In my experience, CF doesn't deal with slow uploads all
that well.

-----Original Message-----
From: John Munyan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 25 November 2003 11:28 a.m.
To: CF-Talk
Subject: RE: Advise about how to upload multiple files

I was just thinking what do you think of forcing users to zip their
pictures into a single archive, then after the upload is complete unzip
the contents, do the database inserts, and post processing?  Or would
this be a bad way to go?

Thanks,

John

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, November 24, 2003 3:24 PM
To: CF-Talk
Subject: Re: Advise about how to upload multiple files

you may wanna concider letting them upload say 5 at a time and having 5
table fields for images in your db.
then just add 5 file fields to the form with names like pic1, pic2,
pic3,
pic4, pic5. then on the action page u need the upload file code for each
field but you really need to check each field to make sure it has
something in it first. you can do this with a simple if statement. then
to
you need to set the serverfile to a unique name cause u can only have 1
to
do the db insert

this line is VERY IMPORTANT
<cfset pic1 = #file.serverfile#>
because when u go to do the insert they each need unique names

something like this (of course change to fit your needs)

<!---
Author: .::. ME .::. [EMAIL PROTECTED]
Date Created:  08/12/03
--->

<!--- make sure productID was passed on --->
<cfif  NOT isdefined("form.submit")>
<h2>Sorry there has been an error, please try again</h2>
<p><a href="" back</a></p>
<cfabort>
</cfif>

<!--- do the file 1 upload now --->
<cfif #form.pic1# NEQ "">
<cffile Action=""> Filefield="pic1"
DESTINATION="C:\Websites\folder\site\uploads\"
Nameconflict="makeunique" accept="image/*">
<cfset pic1 = #file.serverfile#>
</cfif>

<!--- do the file 2 upload now --->
<cfif #form.pic2# NEQ "">
<cffile Action=""> Filefield="pic2"
DESTINATION="C:\Websites\folder\site\uploads\"
Nameconflict="makeunique" accept="image/*">
<cfset pic2 = #file.serverfile#>
</cfif>

<!--- do the file 3 upload now --->
<cfif #form.pic3# NEQ "">
<cffile Action=""> Filefield="pic3"
DESTINATION="C:\Websites\folder\site\uploads\"
Nameconflict="makeunique" accept="image/*">
<cfset pic3 = #file.serverfile#>
</cfif>

<!--- do the file 4 upload now --->
<cfif #form.pic4# NEQ "">
<cffile Action=""> Filefield="pic4"
DESTINATION="C:\Websites\folder\site\uploads\"
Nameconflict="makeunique" accept="image/*">
<cfset pic4 = #file.serverfile#>
</cfif>

<!--- do the file 5 upload now --->
<cfif #form.pic5# NEQ "">
<cffile Action=""> Filefield="pic5"
DESTINATION="C:\Websites\folder\site\uploads\"
Nameconflict="makeunique" accept="image/*">
<cfset pic5 = #file.serverfile#>
</cfif>

<!--- insert the  contents of the form into the db --->
<cfif isdefined ("form.submit")>
<cfquery name="qaddlisting" datasource="#dsn#">
INSERT INTO listings (stock, company, model, price, type, year,
condition, newUsed, color, hitchStyle, construction, axels,
sleeps, hauls, floorLength, tires, emptyWeight, description,
overallEquiptment, stallAreaEquiptment, dressingRoom,
foldingRearTack, pic1, pic2, pic3, pic4, pic5)
VALUES ('#form.stock#', '#form.company#', '#form.model#',
'#form.price#', '#form.type#', '#form.year#', '#form.condition#',
'#form.newUsed#', '#form.color#',  '#form.hitchStyle#',
'#form.construction#', '#form.axels#', '#form.sleeps#',
'#form.hauls#', '#form.floorLength#', '#form.tires#',
'#form.emptyWeight#', '#form.description#',
'#form.overallEquiptment#',
'#form.stallAreaEquiptment#', '#form.dressingRoom#',
'#form.foldingRearTack#',
'#pic1#', '#pic2#', '#pic3#', '#pic4#', '#pic5#')
</cfquery>
</cfif>

<!--- send to menu --->
<cflocation url="" addtoken="no">

>
>
> Message: http://www.houseoffusion.com/lists.cfm?link=i:4:144953
> Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
> Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
> Unsubscribe:
> http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=3248.3032.4

________________________________


  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to