Put <cfif len(trim(form.uploadfield))>
        Upload photos
    </cfif>

around what code is involved in the upload?

e.g.

<cfif len(trim(form.uploadfield))>

        <cfinclude template="/admin/qry/qry_savePhoto.cfm">
        <cf_lastActionMessage class="success">
                Photo uploaded successfully.
        </cf_lastActionMessage>

</cfif>



> -----Original Message-----
> From: Patrick McDonough [mailto:[email protected]]
> Sent: Tuesday, January 06, 2009 10:23 PM
> To: cf-talk
> Subject: File doesnot exsist
> 
> Hey guys, I have one here that is baffling me. I am trying to update a line 
> in a form within an
admin
> that includes an opportunity to upload a new image. I am trying to just 
> update two of the form
> variables. I need a way to update the title and description without uploading 
> a new photo. To that
end I
> tried to insert an if statement within the code bellow to bypass the 
> uploading function:
> 
> <cfparam name="filename" default="">
> 
> <cfif IsDefined("form.filename")>
> 
> <cfif IsDefined("attributes.accountID")>
>       <cfset actionAdj="Account">
>       <cfset actionSuffix="&accountID=#attributes.accountID#">
> <cfelse>
>       <cfset actionAdj="">
>       <cfset actionSuffix="">
> </cfif>
> 
> 
> <cffile action="upload"
>       destination="#request.physicalPath#temp\"
>       filefield="filename"
>       nameconflict="makeunique">
> 
> <cfif Right(cffile.serverfile,4) EQ ".zip">
> 
>       <cfinclude template="act_galleries_uploadPhotos.cfm">
>       <cf_lastActionMessage class="success">
>               Photos uploaded successfully.
>       </cf_lastActionMessage>
>       <cfinclude template="act_galleries_editGallery.cfm">
> <cfelse>
>       <cfinclude template="/admin/qry/qry_savePhoto.cfm">
>       <cf_lastActionMessage class="success">
>               Photo uploaded successfully.
>       </cf_lastActionMessage>
>       <cflocation
>
url="/admin/index.cfm?action=edit#actionAdj#Photo&galleryID=#attributes.galleryID#&photoID=#attribut
es.p
> hotoID##actionSuffix#">
> </cfif>
> 
> </cfif>
> 
> My question is how can I get CF to let me upload the data variables I want 
> and leave the
fiename(image
> file) the same.
> 
> Pat(GRFXS)
> 
> 
> 

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

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317492
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to