Advertisement

03.08.2005 at 04:29PM PST, ID: 21342967
[x]
Attachment Details

File Upload explained in detail

Asked by Tacobell777 in ColdFusion Application Server

Tags: file, upload

I would really appreciate it if someone could explain to me in detail how file upload works.

The reason I am asking is because a client of ours has implemented a global filtering system on the form scope, i.e. removing unwanted characters from the form scope. This is causing problems with the file upload, but I can't seem to make head or tails out of the process. I do know the following;

1. client selects file
2. clients submits form
3. file is uploaded by the browser
4. cf places the file in a temp directory
5. cffile is used to move the file into the appropiate directory

The one thing I cannot seem to get my head around is the fileField attribute on the cffile tag.
Lets say for example that the file input field is called fileToUpload, when I dump the fileToUpload sometimes it contains a directory, and sometimes it contains the contents of the file.
What does cffile do with the field name once it gets it?
Who can expand on the above process?
And most importantly, why is it erroring?
The error is:

Error in CFFILE tag
The form field specified in the CFFILE tag (FILETOUPLOAD) does not contain an uploaded file. Please be sure that you have specified the correct form field name.
 
The following is the regex that performs the removal of the unwanted characters.
// Horizontal tab
validString = addValidCharacter( validString, chr( 9 ) );
// Line feed, new line
validString = addValidCharacter( validString, chr( 10 ) );
// Carriage return
validString = addValidCharacter( validString, chr( 13 ) );
// Line space
validString = addValidCharacter( validString, chr( 32 ) );
// This string holds any other character strings that should be deleted, delimited by the pipe symbol
orClause = "|@@";
// Following are characters that are allowed
regularExpression = "[^-a-z0-9,./?!@()\_:#validString#]#orClause#";
Start Free Trial
 
Loading Advertisement...
 
[+][-]03.08.2005 at 07:17PM PST, ID: 13492645

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: ColdFusion Application Server
Tags: file, upload
Sign Up Now!
Solution Provided By: INSDivision6
Participating Experts: 3
Solution Grade: A
 
 
[+][-]03.08.2005 at 07:24PM PST, ID: 13492690

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.08.2005 at 07:32PM PST, ID: 13492732

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.08.2005 at 07:49PM PST, ID: 13492807

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.08.2005 at 08:44PM PST, ID: 13493052

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.09.2005 at 11:12AM PST, ID: 13499436

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.09.2005 at 11:13AM PST, ID: 13499449

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32