Hmm..update..I just emailed the latest person who generated the error. They 
said that they weren't able to upload their images. Here's the complete query:

<cftransaction>
    
    <cfquery name="Product" datasource="wioDB">
    SET NOCOUNT ON;
    INSERT INTO Products (CatID, UserID, Designer, Model, Color, DressSize, 
Price, Material, Description, Status)
    VALUES ('#Trim(FORM.CatID)#',
    '#Trim(SESSION.Auth.UserID)#', 
    '#Trim(FORM.Designer)#', 
    '#Trim(FORM.Model)#', 
    '#Trim(FORM.Color)#', 
    '#Trim(FORM.DressSize)#', 
    '#Trim(FORM.Price)#', 
    '#Trim(FORM.Material)#', 
    '#Trim(FORM.Description)#',
        'Approved');
    SELECT @@identity AS ProdID FROM Products;
    </cfquery>
    
<!--- Accept the file upload --->
<cfloop from="1" to="3" index="i">

<cfif form["file" & i] is not "">


<cffile 
action="upload" 
filefield="file#i#" 
result="cffile.file#i#"
destination="#ExpandPath('users/uploads/')#" 
nameconflict="makeunique" 
accept="image/jpg, image/JPG, image/jpeg, image/JPEG, image/gif, image/GIF, 
image/pjpeg, image/pjpg">


<!--- Resize, rename and set the quality of the image uploaded with 
cfx_openimage --->
<cfx_openimage
action="iml" 
name="qimages" 
file="#ExpandPath('users/uploads/')##cffile['file'&i].serverFile#" 
commands="
setjpegdpi 72
setquality 100
setimage large=original
setimage thumb=original
## resize if either width or height is greater than 350 or 525
useimage large
resizeif 350,525
write #ExpandPath('users/uploads/'&cffile['file'&i].serverFileName&'.jpg')#

"> 

<!--- Upload to database --->
<cfquery datasource="wioDB">
   
   
   INSERT INTO Images (ProdID, Image, IsPrimary)
   VALUES (#Product.ProdID#,'#cffile['file'&i].serverFile# ', 
   '#Trim(IIf(i is 1, 'primary', 'notprimary') 
   )#'
   )
   
</cfquery>
        </cfif>    
        
</cfloop>
 </cftransaction>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298272
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to