|
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
File doesnot exsist
Put <cfif len(trim(form.uploadfield))>Rick Faircloth 01/06/09 10:49 P 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) 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)
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||