Skip to main content
Known Participant
May 12, 2009
質問

cfimage variable

  • May 12, 2009
  • 返信数 1.
  • 738 ビュー

I am trying to get info for my uploaded variable. Live docs tells me that source can be

source = "absolute pathname|pathname relative to the web root|URL|#cfimage variable#"


How do I set
my uploaded file to  a #cfimage variable#?

Below is what I have but does not work.

<cffile action="upload" nameconflict="overwrite" destination="#ExpandPath("./images")#"
filefield="FORM.uploadImage" result="myFile" />

<cfimage action = "info" source = "#myFile#" structname = "myFile3"

    このトピックへの返信は締め切られました。

    返信数 1

    Inspiring
    May 12, 2009

    The result #myFile# is a structure of information about the uploaded file, not a string.  You need to use some of the values in that structure.  Read the documentation on cffile for a list of the structure contents.

    http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_f_10.html#3540091

    Hulfy作成者
    Known Participant
    May 12, 2009

    Not helped me still struggling to create a cfimage variable that points to the file.

    Thanks

    Inspiring
    May 12, 2009

    The following file upload status parameters are available after an upload:


    resultName.serverDirectory - Directory of the file saved on the server
    resultName.serverFile - Filename of the file saved on the server

    ie

    #myFile.serverDirectory#

    #myFile.serverFile#

    You use those values to construct the file path for cfimage