House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Search cf-talk

July 04, 2009

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Home /  Groups /  ColdFusion Talk (CF-Talk)

File doesnot exsist

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Patrick McDonough
01/06/2009 10:33 PM

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=#attributes.photoID##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)

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Rick Faircloth
01/06/2009 10:49 PM

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> > 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 ----- Excess quoted text cut - see Original Post for more ----- url="/admin/index.cfm?action=edit#actionAdj#Photo&galleryID=#attributes.galleryID#&photoID=#attribut es.p ----- Excess quoted text cut - see Original Post for more ----- fiename(image > file) the same. > > Pat(GRFXS)


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists