Skip to main content
Known Participant
February 7, 2009
Question

dynamically writing a CFML page

  • February 7, 2009
  • 2 replies
  • 255 views
Hi,

I want to read append and write the page below dynamically, it is part of a flex multi-flle uploader

http://www.adobe.com/devnet/coldfusion/articles/multifile_upload.html


I am trying to change the upload folder which I would usually do with a url variable but this is not working. Is it possible to open and append the upload.cfm file with cffile?
    This topic has been closed for replies.

    2 replies

    HulfyAuthor
    Known Participant
    February 7, 2009
    I can write the file if it is plain text

    <cffile action="write"
    file="#ExpandPath("./upload2.cfm")#"
    output="Appended By: ross">


    but what if I want to add some CFML in the output I get an error. Is there a way to "escape out" of the code.


    like

    <cffile action="upload"
    filefield="filedata"
    destination="#ExpandPath('./uploadedFiles')#"
    nameconflict="makeunique"
    accept="application/octet-stream"/>
    Inspiring
    February 7, 2009
    cfm files are simple text files so yes, you can append one to the other with cffile.

    Testing it of course, is a different matter altogether.