If you can't find a solution go back to basics.
Forget that code for the minute and create a couple of test pages.
Form page:
<form action="action.cfm" method="post" enctype="multipart/form-data">
<input type="file" name="myFile" />
<input type="submit" name="submit" />
</form>
Action page:
<cffile action="UPLOAD" filefield="myFile" destination="#ExpandPath('.')#">
<cfdump var="#CFFILE#">
What happens with that on your live server?
Ade
-----Original Message-----
From: Colin Coles [mailto:[EMAIL PROTECTED]
Sent: 28 February 2005 09:19
To: CF-Newbie
Subject: Re: String index out of range: -4
Huge thanks to all those who responded earlier. Nothing has so far altered
the upload problem so I am posting again in the hope that a solution to my
misery will emerge!
I have a form that allows people to upload files to the server. Details
about the users are stored to a database as is the location of their uploads
on the CF server.
The files themselves are stored as shown below. Each time I try to upload,
however, I get the following message:
String index out of range: -6.
This is from the uploadaction page:
<cfinsert datasource = "pre_reg_info" tablename = "upload_table" formfields
= "">
<cffile action="upload" filefield="Form.file_upload"
destination="D:\inetpub\ictmt7\uploads"
accept="application/msword,application/pdf,application/vnd.ms-powerpoint,tex
t/plain">
This from the uploadfileForm
<cfform action="uploadaction.cfm" method="post"
enctype="multipart/form-data">
If I change the directory seting it simply changes the number at the end of
the error alert. I've looked all over the internet for an answer but there
is nothing specific to ColdFusion.
Can anyone help me here?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get help! RoboHelp
http://www.houseoffusion.com/banners/view.cfm?bannerid=58
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:670
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54