Search Results

Search found 6 results on 1 pages for 'cffile'.

Page 1/1 | 1 

  • CFfile -- value is not set to the queried data

    - by user494901
    I have this add user form, it also doubles as a edit user form by querying the data and setting the value="#query.xvalue#". If the user exists (eg, you're editing a user, it loads in the users data from the database. When doing this on the <cffile field it does not load in the data, then when the insert goes to insert data it overrights the database values with a blank string (If a user does not input a new file). How do I avoid this? Code: Form: <br/>Digital Copy<br/> <!--- If null, set a default if not, set the default to database default ---> <cfif len(Trim(certificationsList.cprAdultImage)) EQ 0> <cfinput type="file" required="no" name="cprAdultImage" value="" > <cfelse> File Exists: <cfoutput><a href="#certificationsList.cprAdultImage#">View File</a></cfoutput> <cfinput type="file" required="no" name="cprAdultImage" value="#certificationsList.cprAdultImage#"> </cfif> Form Processor: <!--- Has a file been specificed? ---> <cfif not len(Trim(form.cprAdultImage)) EQ 0> <cffile action="upload" filefield="cprAdultImage" destination="#destination#" nameConflict="makeUnique"> <cfinvokeargument name="cprAdultImage" value="#pathOfFile##cffile.serverFile#"> <cfelse> <cfinvokeargument name="cprAdultImage" value=""> </cfif> CFC ARGS: <cfargument name="cprAdultExp" required="NO"> <cfargument name="cprAdultCompany" type="string" required="no"> <cfargument name="cprAdultImage" type="string" required="no"> <cfargument name="cprAdultOnFile" type="boolean" required="no"> Query: UPDATE mod_StudentCertifications SET cprAdultExp='#DateFormat(ARGUMENTS.cprAdultExp, "mm/dd/yyyy")#', cprAdultCompany='#Trim(ARGUMENTS.cprAdultCompany)#', cprAdultImage='#Trim(ARGUMENTS.cprAdultImage)#', cprAdultOnFile='#Trim(ARGUMENTS.cprAdultOnFile)#' INSERT INTO mod_StudentCertifications( cprAdultExp, cprAdultcompany, cprAdultImage, cprAdultOnFile

    Read the article

  • Importing HTML into TinyMCE using ColdFusion

    - by knawlejj
    Hey everyone, I would appreciate a pointing in the right direction with the problem I'm having. In short, I'm working on an application that will create PDFs using TinyMCE and ColdFusion 8. I have the ability to create a PDF by just entering in text, pictures, etc. However, I want to be able to import an html template and insert it into the TinyMCE . Basically, I have a file directory code snippet that lets me browse through my 'HTMLTemplates' folder, and am able to select an HTML document. Now, I want to be able to take all the code from that selected HTML document and insert it into my TinyMCE box. Any tips on how I might do this, maybe? Thanks!

    Read the article

  • CFHTTP PUT without a physical file

    - by E-Madd
    I'm trying to communicate with an API that requires JSON payloads via PUT method. Is it possible to do this in CFHTTP with CFHTTPPARAM without first writing a file? My code currently looks like this... <cfset json = "{'key':'value'}"> <cffile action="write" file="#ExpandPath('./test.js')#" output="#json#" /> <cfhttp method="put" url="http://servicedomain.com/api/method/" resolveurl="no" username="username" password="password"> <cfhttpparam mimetype="application/json" type="file" name="payload" file="#ExpandPath('./test.js')#" /> </cfhttp>

    Read the article

  • Upload File to Database in ColdFusion

    - by George Johnston
    I simply would like to upload a file to my database using ColdFusion. I understand how to upload an image to a directory, but I would like to place it directly in the database. I have set a database field to varbinary(MAX) to accept the image and have the stored procedure to insert it. Currently my code for uploading the image to my file system is: <cfif isdefined("form.FileUploadImage")> <cffile action="upload" filefield="FileUploadImage" destination="#uploadfolder#" nameconflict="overwrite" accept="image/*" > </cfif> I've obviously left some of the supporting code out, but really all I need to do is get a binary representation of the file stored in memory, instead of the file system. Any experts out there that can help? Thanks, George

    Read the article

  • Java: Looking for hack to deal with Windows file paths in Linux

    - by Chase Seibert
    Say you have a large legacy ColdFusion on top of Java on Windows application. File access is done both via java.io.File and by CFFILE (which in turn also uses java.io.File), but not centralised in any way into a single file access library. Further, say you have file paths both hard-coded in the code, and also in a database. In other words, assume the file paths themselves cannot change. They could be either local or remote Windows file paths: c:\temp\file.txt \\server\share\file.txt Is there a way to run this application on Linux with minimal code changes? I'm looking for creative solutions that do not involve touching the legacy code. Some ideas: Run it on WINE. This actually works, because WINE will translate the local paths, and has a samba client for the remote paths. Is there a way to override java.io.File to perform the file path translation with custom code? In this case, I would translate the remote paths to a mount point.

    Read the article

  • Creating Thumbnails with CFImage Aborting Because of Server Load?

    - by nephilite
    I am uploading in image via a form and I want to, in addition to saving the image, save a variety of thumbnails in both png and jpg format. To do this I am using the code below. The initial image uploads fine but then, after spinning for a moment I get an error of: "Request aborted due to heavy system load." (from my host crystaltech), and none of the thumbnails have made it through. I've tried it with even just one resize (and no converts) and it still fails. What am I doing wrong? This issue is somewhat urgent....Thanks! ` <cffile action="upload" destination="#Application.filePath#Icons\#app#Icon.png" filefield="Icon" nameconflict="overwrite"> <cfimage source="#Application.filePath#Icons\#app#Icon.png" action="resize" width="50%" height="50%" destination="#Application.filePath#Icons\#app#Icon_Half.png" overwrite="yes"> <cfimage source="#Application.filePath#Icons\#app#Icon.png" action="resize" width="25%" height="25%" destination="#Application.filePath#Icons\#app#Icon_Quarter.png" overwrite="yes"> <cfimage source="#Application.filePath#Icons\#app#Icon.png" action="convert" destination="#Application.filePath#Icons\#app#Icon.jpg"> <cfimage source="#Application.filePath#Icons\#app#Icon_Half.png" action="convert" destination="#Application.filePath#Icons\#app#Icon_Half.jpg"> <cfimage source="#Application.filePath#Icons\#app#Icon_Quarter.png" action="convert" destination="#Application.filePath#Icons\#app#Icon_Quarter.jpg"> `

    Read the article

1