Professional Web Applications Themes

Specify temp directory and file name for file uploads? - Macromedia ColdFusion

I'm interested in understanding how MX processes file uploads. 1) By default, uploaded files seem to be placed in the [drive]:\CfusionMX\runtime\servers\default\server-inf\temp\wwwroot-tmp directory. Can you specify a different upload directory? 2) MX seems to generate a random temporary file name, like "neotmp3122.tmp" for uploaded files. Is it possible to specify the name of the temp file used? I know that you can rename the file after it is uploaded, using CFFILE, but is it possible to specify the temporary file name that is used during the upload?...

  1. #1

    Default Specify temp directory and file name for file uploads?

    I'm interested in understanding how MX processes file uploads.

    1) By default, uploaded files seem to be placed in the
    [drive]:\CfusionMX\runtime\servers\default\server-inf\temp\wwwroot-tmp
    directory. Can you specify a different upload directory?

    2) MX seems to generate a random temporary file name, like "neotmp3122.tmp"
    for uploaded files. Is it possible to specify the name of the temp file
    used? I know that you can rename the file after it is uploaded, using
    CFFILE, but is it possible to specify the temporary file name that is used
    during the upload?



    _jt Guest

  2. #2

    Default Re: Specify temp directory and file name for fileuploads?

    You can't change any of these things, unless there's some hidden method of
    digging into the system's config files.

    Want to see something wild? Create the following file and name it
    testupload.html. Note the extension.

    Upload a nice big file. Something big enough that you can watch where it goes
    on the server while its uploading. Despite the fact that the file is pure html
    and has a .html extension, the file no longer goes to the Windows temp folder.
    Its still being handled in the CF temp directory, where on completion of upload
    its promptly deleted as you'd expect.

    --Matt--
    MSB Web Systems... [url]http://mysecretbase.com[/url]
    "When in doubt, mumble. When in trouble, delegate. When in charge, ponder."
    - Senator. David Boren


    <html><head><title></title></head><body>
    <form
    action="testupload.html"
    method="post"
    enctype="multipart/form-data">
    Source File Name:<BR>
    <input
    name="FileContents"
    type="FILE"
    size="45"><br>
    <input
    type="submit"
    value="Upload File">
    </form>
    </body></html>

    MattRobertson Guest

  3. #3

    Default Re: Specify temp directory and file name for fileuploads?

    Dear all

    I am new quest in this forum .
    I am asking about reading files in Coldfusion ,,
    the problem is , I have application that create random files
    with extension ( .info ), when I read the file it cannot read every thing in
    the file , because the first line is too long , so I need the code in
    coldfusion that read from a specific position in the file ,

    is there a coldfusion code that do this ,,

    any help will be appreciated ....
    Thanks .

    F-Rjoub Guest

  4. #4

    Default Re: Specify temp directory and file name for fileuploads?

    Really? You can't change the temp dir? I'm building a site that will manage
    semi-professional video. It's possible some users will upload multiple GB video
    files, and if three people were to upload very large files at the same time
    there exists the very real possibility that the drive will run out of space and
    they'll receive an error. Other than putting the app server on a 120GB drive,
    what else can I do to avoid this?

    michaelmuller Guest

Similar Threads

  1. Web File uploads
    By DanShaw in forum Coldfusion Server Administration
    Replies: 0
    Last Post: February 7th, 04:57 PM
  2. File Uploads
    By gerwazy in forum PHP Development
    Replies: 8
    Last Post: June 16th, 12:33 PM
  3. File uploads without saving file
    By staticthis in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: March 9th, 09:49 PM
  4. PHP and file uploads
    By OneSolution in forum PHP Development
    Replies: 7
    Last Post: November 25th, 05:36 AM
  5. Replies: 0
    Last Post: July 28th, 04:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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