CFFILE - Upload on Unix/Solaris not working..

Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default 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#"^M
    >^M
    The debugging code reads as follows:

    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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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....
    4. 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,...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default 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

  6. #5

    Default 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

  7. #6

    Default 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

  8. #7

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139