Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6224141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:37:13+00:00 2026-05-24T08:37:13+00:00

I am trying to do this <cfset noncooperativevariable = #serverfile#> and I get a

  • 0

I am trying to do this

<cfset noncooperativevariable = #serverfile#>

and I get a serverfile not defined error. When I try to use the correct variable scope

<cfset noncooperativevariable = #CFFILE.serverfile#>

which returns the error.

You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members.

Edit:

<cffile action="upload" filefield="fileUpload" destination="#destination#" nameConflict="makeUnique" result="upload">
<cfset noncooperativevariable = #fileUpload.serverfile#>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:37:14+00:00Added an answer on May 24, 2026 at 8:37 am

    When using the cffile tag, the results are defaulted to the cffile struct in your Variables scope. Therefore, if you are uploading a file with the following code:

    <cffile action="upload" filefield="fileUpload" destination="#destination#" nameConflict="makeUnique" />
    

    The results are accessible via the cffile struct in your Variables scope. The filename would be referenced as follows:

    <cfset cooperativeVariable = cffile.serverfile />
    

    In the snippet posted, you are using the ‘result’ attribute which would place your cffile results in the struct named upload instead of cffile, so you would get the filename like so:

    <cfset cooperativeVariable = upload.serverfile />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i get this error when trying this: ERROR method name expected. How should i
I am trying this code, however i get the error above: <input id=content class=content
I was trying this from some time, but I am not able to get
I've been trying this a couple of different ways, but it's not working for
I am trying to set a variable in a cffunction. The result is this:
While trying this code,it shows this error in the string line. <% String error
I have been trying this for so long, but was not able to implement
I'm trying this and getting an error. SELECT Count(*) FROM CASE @Type WHEN 'UserName'
Trying this answer and not having any luck: I am using the SQLite Database
By trying this use master go select * into #TempTable from sys.all_views select *

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.