Oh...my...gosh...

I am SUCH a bonehead! I can't believe I did that. Yes, that solved the
problem nicely. I can blame my momentary lapse on pregnancy hormones, right?
;)  No? Well, I'm going to anyway. :D

Thanks to everyone. You guys are the absolute BEST!

-----Original Message-----
From: Michael Corrigan [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 11:11 AM
To: CF-Talk
Subject: Re: FileExists returns NO every time, even with absolute path


enctype="multipart/form-data" goes in the form tag lik e so

<form ... enctype="multipart/form-data">

that's fix it for you

Michael Corrigan
Programmer
Endora Digital Solutions
1900 Highland Avenue, Suite 200
Lombard, IL 60148
630-627-5055 ext.-136
630/627-5255 Fax
  ----- Original Message ----- 
  From: Stocke Terri 
  To: CF-Talk 
  Sent: Friday, April 05, 2002 10:03 AM
  Subject: RE: FileExists returns NO every time, even with absolute path


  Hi Matt--

  Sure. All I need to do is allow a user to upload a document (just one. Not
  dealing with multiple uploads or anything). The docs are going to be used
in
  a Verity search. On my form I'm using <input type="file"
name="description"
  size=40 enctype="multipart/form-data"> to allow the user to browse their
  system for the file.

  I've tried every combination I can think of (quotes, no quotes, not
checking
  for file existence, etc.), but no matter what I do, CF cannot find the
file
  that I specified in my form field (the form field is called
"description").
  The weird thing is, this exact same code works fine in another app that I
  created.

  So I took out the FileExists check and just tried to go right to the
cffile
  tag to perform the upload, but CF tells me that the form field description
  does not contain an uploaded file. What piece of code am I missing to get
  this to work?

  -----Original Message-----
  From: Matthew R. Small [mailto:[EMAIL PROTECTED]]
  Sent: Friday, April 05, 2002 11:06 AM
  To: CF-Talk
  Subject: RE: FileExists returns NO every time, even with absolute path


  How about 

  #fileExists("C:\MyDocs\app_request.doc")#


  Are you trying to verify the existence of a file on the client machine?

  I've been reading the thread, but do you mind explaining what you're
  doing again?

  - Matt Small


  -----Original Message-----
  From: Stocke Terri [mailto:[EMAIL PROTECTED]] 
  Sent: Friday, April 05, 2002 10:06 AM
  To: CF-Talk
  Subject: RE: FileExists returns NO every time, even with absolute path

  Here's what I get with the different variations. I must be doing
  something
  totally bone-headed, but I just can't spot it:

  ************************************************************************
  ****
  ******
  With:  #fileExists(C:\MyDocs\app_request.doc)#

  I Get:

  Error Diagnostic Information
  Just in time compilation error

  Invalid parser construct found on line 92 at position 47. ColdFusion was
  looking at the following text:

  :
  Invalid expression format. The usual cause is an error in the expression
  structure.

  ************************************************************************
  ****
  ***

  With: #fileExists(C:\MyDocs\app_request.doc)#

  I get: NO

  ************************************************************************
  ****
  ***

  With: #fileExists(form.description)#

  I get: NO

  ************************************************************************
  ****
  *

  With: #fileExists("form.description")#

  I get: NO

  ************************************************************************
  ****

  If I remove the FileExists function altogether and go straight to my
  upload
  (enctype="multipart/form-data" is specified in my form field from the
  form):

  <cffile 
  destination="D:\mypath\verity\hrdocs\"
  action="upload"
  nameconflict="overwrite"
  filefield="description"
  accept="application/msword, application/pdf,
  application/vnd.ms-excel, application/vnd.ms-powerpoint">

  <cfset descriptionfile=#file.serverfile#>

  I get:

  Error Diagnostic Information
  Error in CFFILE tag

  The form field specified in the CFFILE tag (DESCRIPTION) does not
  contain an
  uploaded file. Please be sure that you have specified the correct form
  field
  name.

  ************************************************************************
  ****


  -----Original Message-----
  From: Michael Corrigan [mailto:[EMAIL PROTECTED]]
  Sent: Friday, April 05, 2002 9:49 AM
  To: CF-Talk
  Subject: Re: FileExists returns NO every time, even with absolute path


  Try this

  #fileExists(form.description)#  >> No quotes inside the parenthesis.  I
  got
  a Yes return.

  Michael Corrigan
  Programmer
  Endora Digital Solutions
  1900 Highland Avenue, Suite 200
  Lombard, IL 60148
  630-627-5055 ext.-136
  630/627-5255 Fax
    ----- Original Message ----- 
    From: Stocke Terri 
    To: CF-Talk 
    Sent: Friday, April 05, 2002 8:36 AM
    Subject: RE: FileExists returns NO every time, even with absolute path


    I used this same code in another app for the same thing, and it worked
  fine.
    Also, if I remove the fileExists function and just try to upload the
  file
    without checking for it, I get the error that the file doesn't exist.
  For
    some reason CF just doesn't want to see these files and upload them.
  ??

    -----Original Message-----
    From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
    Sent: Friday, April 05, 2002 9:37 AM
    To: CF-Talk
    Subject: RE: FileExists returns NO every time, even with absolute path


    doesn't fileExists look to find the file on the server, not the local
    machine. The form.description is the reference to the path & filename
  on
  the
    client PC.

    Alex

    -----Original Message-----
    From: Stocke Terri [mailto:[EMAIL PROTECTED]]
    Sent: 05 April 2002 15:24
    To: CF-Talk
    Subject: FileExists returns NO every time, even with absolute path


    Hi All,

    This is maddening.

    I am using FileExists to check for the existence of a file that I am
    browsing to on my local machine. No matter what file I choose, the
    FileExists function returns NO every time, even though I am 100%
  positive
    that the file does exist. I have included a small portion of code that
  I
  am
    using for debugging purposes.
    The first outputted variable (form.description) displays the file
  path,
    which is C:\MyDocs\app_request.doc. The second outputted variable
  displays
    "NO". Even if I replace the form.description in the second outputted
    variable with C:\MyDocs\app_request.doc, it still returns NO. Any
  ideas?

    <cfif form.description is not "">

    <cfoutput>
    #form.description#<br>
    #fileExists("form.description")# 
    </cfoutput>

    <cfabort> 

    <cfif NOT #fileExists(form.description)#>
    Do this...
    </cfif>

    Terri 



    



  

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to