Check File Size Before Uploading

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default Check File Size Before Uploading

    Is there anyway to check a files size before uploading it to the web server. I have searched the web over and found nothing for coldfusion...

    Thanks in advance!!!
    bweno Guest

  2. Similar Questions and Discussions

    1. Flash uploading -- file size limit?
      I have been testing the CF ProFlashUpload tool from http://www.cftagstore.com/tags/flashmultipleupload.cfm but so far it won't upload anything...
    2. How to Check In w/out uploading
      Isnt there a way to check out a file, do some work on it, check it back in WITHOUT uploading the file to the webserver? What if I wanted to do some...
    3. SOAPExtension to check file size
      Hi, I have written an extension which checks a message size before processing it. If it is over a limit I want to throw an exception within my...
    4. uploading file size limit
      Hi all, I have an intranet page that allows users to upload files. Some of our files are quite large (~300+MB). I've successfully set the...
    5. Problem uploading file of large size in Perl/Apache/Linux
      Hi need an urgent help!!!!!! I m facing problem with uploading a file to my server using http protocol I have one perl script which upload...
  3. #2

    Default Re: Check File Size Before Uploading

    CF doesn't have any ability to check for the size of your file before it's
    stored on the server. The best you can do is check immediately after it is
    uploaded, and delete if it exceeds a certain size limit.

    loopthis! Guest

  4. #3

    Default Re: Check File Size Before Uploading

    Once the file has been uploaded to the CF server, you can reference it's file
    size with this:

    cffile.filesize

    Then you can insert logic based on the results.

    Ex. <cfif cffile.filesize GT 40960>Error message here<cfelse>File
    Accepted</cfif>

    Hope this helps.

    Rich Leach
    Advanced Certified Macromedia ColdFusion Developer

    rich@tcaprint.com Guest

  5. #4

    Default Re: Check File Size Before Uploading

    > Is there anyway to check a files size before uploading it to the web
    server. I have searched the web over and found nothing for coldfusion...

    You cannot do it only in ColdFusion (or only in PHP or ASP). You can use a
    Java applet to upload the file and check the file size before uploading.

    --
    <mack />


    Neculai Macarie Guest

  6. #5

    Default Re: Check File Size Before Uploading

    Might wanna look here:

    [url]http://www.adiabata.com/Demos/upload_demo.cfm[/url]

    adiabata Guest

  7. #6

    Default Re: Check File Size Before Uploading

    adiabata,

    Did you see the questions for you on this [url]http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=7&threadid=973435&highlight_ key=y?[/url]

    mxstu Guest

  8. #7

    Default Re: Check File Size Before Uploading

    I think, the answer is here:

    [url]http://www.cftagstore.com/tags/cfxupload.cfm[/url]

    adiabata Guest

  9. #8

    Default Re: Check File Size Before Uploading

    You might want to post that link on the other thread, for the people that inquired.
    mxstu Guest

  10. #9

    Default Re: Check File Size Before Uploading

    Check out the var #CGI.content_length# for a general idea on the size before you decide to receive the file.
    Unregistered 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