this cant be all that is in the form.cfm file...
<input type="file" name="uploadFile">

it seems that i have gotten that same error at one time or another. I want to say that it happened when someone tried to upload a 0 byte file? I'm not betting any body parts on that though : )

if thats not it, try letting everyone upload to the same directory and see what happens.
if it works, then your missing whatever directory they are trying to upload to
  ----- Original Message -----
  From: Ron Connelly
  To: CF-Talk
  Sent: Thursday, August 05, 2004 3:21 PM
  Subject: CFFILE Mystery

  I am having difficulty with a CFFILE upload statement.  It works for
  me everytime, regardless of which of my 4 machines i use (3 Win2K, 1
  WinNT), and whether I access the site from my LAN or via dialup.  
  Even after resettingthe application and session vars.

  Yet 3 others using machines running WinXP & Win2K all cannot make it
  work. 2 of those use the same cable Net access company i do.  All of
  us are using IE6.

  The server is mine, and is colocated off my site-- everyone reaches
  the server via the Internet.  I have everyone log into this secure
  part of the app with the same user/password.

  The error returned is "String index out of range: -7" (the integer
  varies but is always negative).  The CF debug info tells me the error
  is occurring at my CFFILE statement.

  The application is uploading the file to a path not under the Web
  root on my CF server.  The filename it is saved as is created
  according to some submitted form info, that is saved to a SQL Server
  table.  When I use the app, the file uploads successfully, and the
  data is entered in the table.  I can verify that through the remote
  desktop of the server.

  Here is the relevant code:

  Application.cfm:
  *******************************************
  <cfif session.siteID EQ 1>
  <cfset siteDir = "city">
  <cfelseif session.siteID EQ 2>
  <cfset siteDir = "cham">
  <cfelseif session.siteID EQ 3>
  <cfset siteDir = "comm">
  <cfelse>
  <cfset siteDir = "misc">
  </cfif>

  <cfset docdir = "F:\docs\lcf\" & #siteDir# & "\">

  Form.cfm:
  *******************************************
  <input type="file" name="uploadFile">

  Action.cfm:
  *******************************************
  <cfset filename1 = #q_commID.commacro# & "_" & #q_mtgtype.mtgacro# &
  "_" & #filedate#>

  <cfset docpath = #docdir# & #filename1#>

  <cffile action="" destination="#docpath#"
  nameconflict="overwrite" filefield="form.uploadFile"
  accept="image/jpeg, image/jpg, image/pjpeg, image/gif,
  application/pdf">

  I've been struggling with this for several days, so any help would be
  greatly appreciated.

  --

  Best Regards,
  Ron Connelly
  [EMAIL PROTECTED]
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to