Ewok,

Thanks much for the help.  I finally solved it this way:

I was actually using 2 CFFILE statements to accomplish the entire
action: first one to upload the file, and second one to rename the
file with the original file extension.  Ahead of the first CFFILE I  
was using some CFSET statements to set the path and a recreated
filename.  I changed the method a bit, and saved the entire
filenaming logic for the second CFFILE, instead of just adding the
file extension with it.  I also hard-coded all of the path info in
both CFFILEs that wasn't generated dynamically.

And you're right, that wasn't the only thing in the form-- I was
simplifying for readability.  I also didn't include the second CFFILE
for the same reason-- the error indicated everything was stopping at
the first.

Thanks again for taking the time to help!

Ron

On 5 Aug 2004 at 21:00, Ewok wrote:

> :) I hit cntrl+enter and it sent before i was done
>
> like i said, if that works then you are missing the directory they are trying to put the file in. Possibly because of session timeouts? or it just doesnt exist?
>
>   ----- Original Message -----
>   From: Ewok
>   To: CF-Talk
>   Sent: Thursday, August 05, 2004 8:45 PM
>   Subject: Re: CFFILE Mystery
>
>
>   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