Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
DaveF67 #1
CFFILE - Upload on Unix/Solaris not working..
after removing MODE and ACCEPT This still does not work:
<CFFILE ACTION="UPLOAD" FILEFIELD="Form.FiletoUpload"^M
DESTINATION="#variable.v_UPLOADdir#/site/#FORM.SITEID#/upload"^M
NAMECONFLICT="#nameConflict#"^MThe debugging code reads as follows:>^M
Parameter Data Description
attemptedServerFile - E550.pdf - Initial name ColdFusion used when attempting
to save a file
clientDirectory - C:\Documents and Settings\Davef\My Documents\E550.pdf -
Directory location of the file uploaded from the client's system
clientFile - E550.pdf - Name of the file uploaded from the client's system
clientFileExt -- pdf - Extension of the uploaded file on the client's system
without a period, for example, txt not .txt
clientFileName - E550 - Filename, without an extension, of the uploaded file
on the client's system
contentSubType - pdf - MIME content subtype of the saved file
contentType - application - MIME content type of the saved file
dateLastAccessed {d '1969-12-31'} Date and time the uploaded file was last
accessed
fileExisted NO Indicates (Yes or No) whether or not the file already existed
with the same path
fileSize 0 Size of the uploaded file
fileWasAppended NO Indicates (Yes or No) whether ColdFusion appends the
uploaded file to an existing file
fileWasOverwritten NO Indicates (Yes or No) whether ColdFusion overwrites a
file
fileWasRenamed NO Indicates (Yes or No) whether the uploaded file is renamed
to avoid a name conflict
fileWasSaved NO Indicates (Yes or No) whether Cold Fusion saves a file
oldFileSize 0 Size of a file that was overwritten in the file upload operation
serverDirectory /usr/local/apache2/htdocs/infoweb3/site/1/upload Directory of
the file saved on the server
serverFile E550.pdf Filename of the file saved on the server
serverFileExt pdf Extension of the uploaded file on the server, without a
period
serverFileName E550 Filename, without an extension, of the uploaded file on
the server
timeCreated {ts '1969-12-31 19:00:00'} Time the uploaded file was created
timeLastModified {ts '1969-12-31 19:00:00'} Date and time of the last
modification to the uploaded file
ALSO...
under Form Fields I see this:
FILETOUPLOAD=/opt/coldfusionmx7/runtime/servers/coldfusion/SERVER-INF/temp/wwwro
ot-tmp/neotmp27423.tmp
but when I check in that directory, there are no files :(
<TABLE cellSpacing=1 cellPadding=0 border=0 BGCOLOR="blue" class="sm">
<TR vAlign=top><TH align=left><B>Parameter</B></TH><TH
align=left><B>Data</B> </TH>
<TH align=left><B>Description</B></TH></TR>
<TR vAlign=top><TD align=left>attemptedServerFile</TD>
<TD class="smb">#cffile.attemptedServerFile#</TD>
<TD align=left>Initial name ColdFusion used when attempting to save a file
</TD></TR>
<TR vAlign=top><TD align=left>clientDirectory </TD><TD
class="smb">#cffile.clientDirectory#</TD>
<TD align=left>Directory location of the file uploaded from the client's
system </TD></TR>
<TR vAlign=top><TD align=left>clientFile </TD><TD
class="smb">#cffile.clientFile#</TD>
<TD align=left>Name of the file uploaded from the client's system
</TD></TR>
<TR vAlign=top><TD align=left>clientFileExt</TD><TD
class="smb">#cffile.clientFileExt#</TD>
<TD align=left>Extension of the uploaded file on the client's system
without a period, for example,
txt not .txt </TD></TR>
<TR vAlign=top><TD align=left>clientFileName</TD><TD
class="smb">#cffile.clientFileName#</TD>
<TD align=left>Filename, without an extension, of the uploaded file on the
client's system </TD></TR>
<TR vAlign=top><TD align=left>contentSubType</TD><TD
class="smb">#cffile.contentSubType#</TD>
<TD align=left>MIME content subtype of the saved file</TD></TR>
<TR vAlign=top><TD align=left>contentType</TD><TD
class="smb">#cffile.contentType#</TD>
<TD align=left>MIME content type of the saved file</TD></TR>
<TR vAlign=top><TD align=left>dateLastAccessed </TD><TD
class="smb">#cffile.dateLastAccessed#</TD>
<TD align=left>Date and time the uploaded file was last accessed</TD></TR>
<TR vAlign=top><TD align=left>fileExisted</TD><TD
class="smb">#cffile.fileExisted#</TD>
<TD align=left>Indicates (Yes or No) whether or not the file already
existed with the same path </TD></TR>
<TR vAlign=top><TD align=left>fileSize </TD><TD
class="smb">#cffile.fileSize#</TD>
<TD align=left>Size of the uploaded file </TD></TR>
<TR vAlign=top><TD align=left>fileWasAppended </TD><TD
class="smb">#cffile.fileWasAppended#</TD>
<TD align=left>Indicates (Yes or No) whether ColdFusion appends the
uploaded file
to an existing file </TD></TR>
<TR vAlign=top><TD align=left>fileWasOverwritten</TD><TD
class="smb">#cffile.fileWasOverwritten#</TD>
<TD align=left>Indicates (Yes or No) whether ColdFusion overwrites a file
</TD></TR>
<TR vAlign=top><TD align=left>fileWasRenamed </TD><TD
class="smb">#cffile.fileWasRenamed#</TD>
<TD align=left>Indicates (Yes or No) whether the uploaded file is renamed
to avoid a
name conflict </TD></TR>
<TR vAlign=top><TD align=left>fileWasSaved </TD><TD
class="smb">#cffile.fileWasSaved#</TD>
<TD align=left>Indicates (Yes or No) whether Cold Fusion saves a file
</TD></TR>
<TR vAlign=top><TD align=left>oldFileSize</TD><TD
class="smb">#cffile.oldFileSize#</TD>
<TD align=left>Size of a file that was overwritten in the file upload
operation </TD></TR>
<TR vAlign=top><TD align=left>serverDirectory</TD><TD
class="smb">#cffile.serverDirectory#</TD>
<TD align=left>Directory of the file saved on the server </TD></TR>
<TR vAlign=top><TD align=left>serverFile </TD><TD
class="smb">#cffile.serverFile#</TD>
<TD align=left>Filename of the file saved on the server </TD></TR>
<TR vAlign=top><TD align=left>serverFileExt </TD><TD
class="smb">#cffile.serverFileExt#</TD>
<TD align=left>Extension of the uploaded file on the server, without a
period </TD></TR>
<TR vAlign=top><TD align=left>serverFileName</TD><TD
class="smb">#cffile.serverFileName#</TD>
<TD align=left>Filename, without an extension, of the uploaded file on the
server </TD></TR>
<TR vAlign=top><TD align=left>timeCreated </TD><TD
class="smb">#cffile.timeCreated#</TD>
<TD align=left>Time the uploaded file was created</TD></TR>
<TR vAlign=top><TD align=left>timeLastModified</TD><TD
class="smb">#cffile.timeLastModified#</TD>
<TD align=left>Date and time of the last modification to the uploaded file
</TD></TR>
</TBODY>
</TABLE>
DaveF67 Guest
-
CFFILE Upload Suddenly Not Working
Originally this worked, and now it processes it and puts the correct url in the database, but it just doesn't upload the image. Any help why it... -
CFFILE Upload
Hi, i would build an upload form for pictures. how can i limit the upload to the size attributes (width & height) of the picture? the user should... -
CGI upload to CFFILE
Hello, I find that there is a security feature that does not allow the prefilling of the path in a form "<input type="file" name="fieldname">" tag.... -
cffile upload - makeunique not working
My application allows clients to upload images to their account. The process of my application is: upload file from form, set to variable myFile,... -
Question: C2 Security Configuration for general Unix and Solaris/Trusted Solaris (Auditing)
While reviewing the DoD 5200.28-STD "DEPARTMENT OF DEFENSE TRUSTED COMPUTER SYSTEM EVALUATION CRITERIA" document and looking over "Security... -
Kronin555 #2
Re: CFFILE - Upload on Unix/Solaris not working..
What version of Coldfusion?
I have cffile action=upload working fine with CFMX 6.1 on Solaris 8.
Also, remove the form. in your filefield="" name and add a trailing slash to
your DESTINATION:
<CFFILE ACTION="UPLOAD" FILEFIELD="FiletoUpload"
DESTINATION="#variable.v_UPLOADdir#/site/#FORM.SITEID#/upload/"
NAMECONFLICT="#nameConflict#"See the example in the docs. There is no FORM. in their examples:>
[url]http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p35.htm#wp3540091[/url]
Does the user that coldfusion is running as have write permissions to the
DESTINATION directory?
Kronin555 Guest
-
DaveF67 #3
Re: CFFILE - Upload on Unix/Solaris not working..
Originally posted by: Kronin555
What version of Coldfusion?
I have cffile action=upload working fine with CFMX 6.1 on Solaris 8.
I got CFFile working once in 6.1.... but I am using MX7
Also, remove the form. in your filefield="" name and add a trailing slash to
your DESTINATION:
<CFFILE ACTION="UPLOAD" FILEFIELD="FiletoUpload"
DESTINATION="#variable.v_UPLOADdir#/site/#FORM.SITEID#/upload/"
NAMECONFLICT="#nameConflict#"**** Nice Catch! **** I changed it to "#FORM.FiletoUpload#">
See the example in the docs. There is no FORM. in their examples:
[url]http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p35.htm#wp3540091[/url]
Does the user that coldfusion is running as have write permissions to the
DESTINATION directory?
I will need to chech on this...
Aftter changing to "#FORM.FiletoUpload#" I now get:
The form field
"/opt/coldfusionmx7/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp/neotm
p27424.tmp"
did not contain a file.
DaveF67 Guest
-
Kronin555 #4
Re: CFFILE - Upload on Unix/Solaris not working..
The form field
"/opt/coldfusionmx7/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp/neotm
p27424.tmp"
did not contain a file.
OK, are you sure you have the enctype on your form set correctly?
<form enctype="multipart/form-data">
Kronin555 Guest
-
DaveF67 #5
Re: CFFILE - Upload on Unix/Solaris not working..
the enctype is ok...
when I use "FileToUpload" I get NO ERRORS, but the debugging code reads the
same as the first post. i.e. filesize = 0 (size of the uploaded file),
fileWasSaved=No etc.
When I use "#FileToUpload#" I get this ERROR:
Error Occurred While Processing Request
The form field
"/opt/coldfusionmx7/runtime/servers/coldfusion/SERVER-INF/temp/wwwroot-tmp/neotm
p27444.tmp" did not contain a file.
The error occurred in *** EDITED ****
38 : <CFFILE ACTION="UPLOAD" FILEFIELD="#FiletoUpload#"
39 : DESTINATION="#variable.v_UPLOADdir#/site/#FORM.SITEID#/upload"
40 : NAMECONFLICT="#nameConflict#"
41 : >
42 :
DaveF67 Guest
-
Kronin555 #6
Re: CFFILE - Upload on Unix/Solaris not working..
Dave,
I will say it again. Do not, I repeat do not, place the filefield name in
##'s. It should simply be:
filefield="FileToUpload"
Some more troubleshooting:
Make sure that this directory:
/usr/local/apache2/htdocs/infoweb3/site/1/upload
exists on the server. Also, ensure that it is writable by the user that
Coldfusion is running as.
Check the coldfusion log files to see if there's any further debugging
information in there. Specifically Application.log and Server.log
Kronin555 Guest
-
DaveF67 #7
Re: CFFILE - Upload on Unix/Solaris not working..
a chmod 777 to this dir
/usr/local/apache2/htdocs/infoweb3/site/1/upload
seems to have fixed the problem.
THANKS!
DaveF67 Guest



Reply With Quote

