Skip navigation
Currently Being Moderated

CFFile action blues

May 15, 2012 2:41 PM

I am trying to let a user upload excel spreadsheets to a different directory that is located on our webserver.

 

I have tried many paths but it always comes back withe same error.     pls see cod

 

 

 

 

<form action="upLoadFileAction2.cfm"

        enctype="multipart/form-data"

        method="post">

    <p>Enter the complete path and filename of the file to upload:

    <input type="file"

            name="datafile"

            size="125">

    </p>

    <input     type="submit"

            value="Upload">

</form>

 

--------------------------------------------------------------------- ---------------------------------------------------------------------- --

         <cffile action="upload"
        destination="S:\LibraryData\FORMS\PROSPECTUS_and_WORKSHEET\NEWkshts/"
        nameConflict="overwrite"
        fileField="dataFifle" >
            
<cfoutput>
You uploaded #cffile.ClientFileName#.#cffile.ClientFileExt#
            successfully to #cffile.ServerDirectory#.
</cfoutput>

 
Replies
  • Currently Being Moderated
    May 15, 2012 3:13 PM   in reply to rockhiker

    You didn't tell us the error, but it might have something to do with the forward slash at the end of your destination.

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 6:22 PM   in reply to rockhiker

    Did you check the spelling of your form field name carefully? I see dataFile and dataFifle.

     

    Make sure your application.cfm or application.cfc file does not manipulate form.dataFile. I had some logic that trimmed the contents and did some xss filtering -- cffile=upload didn't like that.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points