Hello all. I am having a problem with <cffile> that I wanted to see if you could help with. The first thing I will point out is that this code is working on our web server here at work, however I tried, unsuccessfully, to use the same basic code on a remote server (hosted by godaddy) with no results.
It is a very simple form designed only to upload a document to a directory on the server. Initially, I thought I simply did not have the server path correct, and I was getting a "page not found" error. Then I spoke with godaddy and they directed me here for the absolute path on my server:
Now, instead of the page not found error, I'm receiving the following error:
Error Occurred While Processing Request
String index out of range: -9
Please try the following:
Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debugging Settings, and select the Robust Exception Information option.
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Remote Address 168.215.114.242
Referrer Date/Time 19-May-06 05:51 AM
And it's weird, the value after the "string index out of range:" seems to correspond with the length of the file name that's trying to be uploaded.
Lastly, I will mention as well that the godaddy rep was telling me that I won't be able to upload directly to a folder within my web structure, but rather to a shared "temp" folder somewhere else on the server. This didn't sound right to me, but I wanted to check with you guys and see if such a claim makes sense. Anyway, here is the code -
form page:
<form action="uploadaction.cfm" enctype="multipart/form-data" method="post">
<div align="left">
<input name="FiletoUpload" type="file" class="TableCellText" size="65">
</div>
<div align="left">
<input name="submit" type="submit" class="TableCellText" value="Upload">
</div>
</form>
action page:
<cffile action="upload"
destination="/home/content/f/i/t/fitzgerald2006/html/temp"
nameconflict="overwrite"
filefield="Form.FiletoUpload">
<cfoutput> You uploaded <strong>#cffile.ClientFileName#.#cffile.ClientFileext# </strong>succesfully.</cfoutput>
Sorry for the exceedingly long post. Any help is greatly appreciated!
Thanks,
Brian
It is a very simple form designed only to upload a document to a directory on the server. Initially, I thought I simply did not have the server path correct, and I was getting a "page not found" error. Then I spoke with godaddy and they directed me here for the absolute path on my server:
Now, instead of the page not found error, I'm receiving the following error:
Error Occurred While Processing Request
String index out of range: -9
Please try the following:
Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debugging Settings, and select the Robust Exception Information option.
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
Remote Address 168.215.114.242
Referrer Date/Time 19-May-06 05:51 AM
And it's weird, the value after the "string index out of range:" seems to correspond with the length of the file name that's trying to be uploaded.
Lastly, I will mention as well that the godaddy rep was telling me that I won't be able to upload directly to a folder within my web structure, but rather to a shared "temp" folder somewhere else on the server. This didn't sound right to me, but I wanted to check with you guys and see if such a claim makes sense. Anyway, here is the code -
form page:
<form action="uploadaction.cfm" enctype="multipart/form-data" method="post">
<div align="left">
<input name="FiletoUpload" type="file" class="TableCellText" size="65">
</div>
<div align="left">
<input name="submit" type="submit" class="TableCellText" value="Upload">
</div>
</form>
action page:
<cffile action="upload"
destination="/home/content/f/i/t/fitzgerald2006/html/temp"
nameconflict="overwrite"
filefield="Form.FiletoUpload">
<cfoutput> You uploaded <strong>#cffile.ClientFileName#.#cffile.ClientFileext# </strong>succesfully.</cfoutput>
Sorry for the exceedingly long post. Any help is greatly appreciated!
Thanks,
Brian