I have uploaded file name as "Front page.jpg". Here there are two spaces between Front & page on my original file.
When I submit the form, The cffile.SERVERFILE comes up with Front page.jpg only single space between Front & page.
Here the file uploaded as it's original name ( double spaces between Front & page ) in my file explore but the server file return only single space between the both string.
Now, I want to pass this SERVERFILE name into my second action page & on the second action page , I should check the specific file exist or not. When I check my recent upload file( Front page.jpg ) does not exits. Because my SERVERFILE return only single space between the both string.
How I can escape from this issue.
Make sure,
I have used pre tag to display the file name - It's display good with double spaces.
As per client requirement I should not have a permission to rename the file with underscore( _ ) or some other delimeter to avoid space.
I want to pass my file name with more than one space to another page. That's my requirement.

My sample code here :
if( cgi.REQUEST_METHOD == "post" ) {
tempDir = expandPath( "./temp" ) & "/";
if( !directoryExists( tempDir ) ) directoryCreate( tempDir );
fileData = fileUpload( tempDir, "fileField", "*", "makeunique" );
writeoutput( "Display with Pre tag : <pre>#fileData.serverFile#</pre>" );
writeoutput( "Display without Pre tag : #fileData.serverFile#" );
writeDump( fileData );
}
I am not sure why, but when I tried to replicate this I also had the double spaces reduced to single spaces within the form scope.
Instead, use the getHttpRequestData method, and you should see
serverfile=Front++page.jpgin the content. I have had several issues with ColdFusion manipulating http request data, but getHttpRequestData has always worked as expected.