• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cffile problems

Guest
Feb 14, 2007 Feb 14, 2007

Copy link to clipboard

Copied

Hey Everyone,

I am currently developing an app that allows dentists to upload referrals to my clients website (an Orthodontist) What I am trying to accomplish is to have a form that allows you to provide the info but to also allow the dentist to upload an xray. The problem that I am running into is that when you don't attach an xray the site throws an error. The most recent solution I have found works when I test it here at home on my develioper edition but as soon as upload to the host it throws this error: Security Error

Is this a problem with the hosting company not allowing it to "read" if there is a file or not? I have also attached the action page code for you to check out. Thanks for your help!
TOPICS
Advanced techniques

Views

262

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 14, 2007 Feb 14, 2007

Copy link to clipboard

Copied

You have a <cfif> in the values section of your insert; you also need one in the fields section: <cfif FileExists(form.xray)>, var</cfif> Make sure the comma after "concerns" is placed inside the <cfif>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 14, 2007 Feb 14, 2007

Copy link to clipboard

Copied

Hey Jdeline,

Thank you for your quick response but I actually figured out a work around. Check out the attached code to see how I solved the problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2007 Feb 14, 2007

Copy link to clipboard

Copied

LATEST
<cfif FileExists(form.xray)>
Is only good if form.xray is a string representing an absolute path to the file. In any case, this is about a file on the server, not on the client.

<cfif form.xray GT "">
Should be, for example, <cfif Len(Trim(form.xray)) GT 0>




Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation