Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Upload Progress Bar

    I am posting this in the cold fusion forums cause its the language I know best,
    but I will do this in anyway possible. I just want to create a progress bar for
    files being uploaded. My site has a feature where people can upload files to
    me, but they want to be able to see how much of the file is done. Is there any
    way at all possible to do this that anyone can think of?

    kenji776 Guest

  2. Similar Questions and Discussions

    1. File upload/Download/Remove/Progress
      I want to create multiple file upload and download and remove functionality in flash with php as server side scripting. Can you please suggest some...
    2. File Upload Progress Bar
      I'm working in a LAMP environment an would like to add a progress bar to ADDT File Upload and Multiple Upload Server Behaviors to visually...
    3. #39955 [NEW]: File upload progress hooks for PHP 4
      From: mlemos at acm dot org Operating system: PHP version: 4.4.4 PHP Bug Type: Feature/Change Request Bug description: File...
    4. Upload Friendly (Multiple File Upload Applet)
      Title : Upload Friendly (Multiple File Upload Applet) Description : UploadFriendly is an easy to use Java Applet that will allow multiple file...
    5. [PHP-DEV] [PATCH] upload-progress-tracking
      --=-uB3N2vF+vOC4vFfRxdDj Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, This is a patch that implements a hooking mechanism...
  3. #2

    Default Re: Upload Progress Bar

    In the new CF MX 7 book by Ben Forta there is a progress bar example using the <cfflush> tag and some JavaScript. I don't have my copy of the book handy so I can't tell you the page number.
    LeftCorner Guest

  4. #3

    Default Re: Upload Progress Bar

    Page 794...
    walker25419 Guest

  5. #4

    Default Re: Upload Progress Bar

    Kenji,

    The CFFlush tag will help you write a progress bar for downloading, but not
    for uploading. I guess you create a workaround though. What if you had another
    template that checked the temporary upload directory for a new file to come in,
    and then displayed the size (in kB) to the user in a separate frame or window
    until the first page tells it that the file is now uploaded.

    This is kind of hokey, and you might find more problems than you bargained
    for, but it might work. Of course, there might be a much better solution as
    well, though I don't know of one.

    Swift

    Swift Guest

  6. #5

    Default Re: Upload Progress Bar

    Your idea may be slightly hokey but I think it may work pretty good actually.
    So what you are saying is:
    1) User begins upload of file
    2) When the file start uploading launch a new window that gets passed the file
    name they are uploading
    3)Run the cffile tag against the file being uploaded that reports how many
    bytes have been uploaded
    4)Have the reporting page refresh every second so it can get the newest info
    on the file uploaded.

    My only qustion is there a way i can determine the size that the file is going
    to be when its done, so I can have a little thing that just says
    15/500 kilobytes uploaded so far...
    just so I can tell the user the amount uploaded and the total amount, or can I
    only tell the user the amount uploaded thus far. I think I like your idea, with
    some nifty formatting and maybe a DHTML script from dynamicdrive I could make a
    semi decent progress bar. Ill be sure to share my code with the forums if/when
    I ever get it written. I have a few other projects I gotta code first, but this
    one interests me cause it seems as though nobody has done it thus far. It might
    end up being a little outta my league though. We will see. Post any suggestions
    or sample code here, i'll kinda make this my running project thread. Thanks
    again.

    kenji776 Guest

  7. #6

    Default Re: Upload Progress Bar

    A couple of crazy assumptions have to be made for this idea to even work.

    First off, you have to assume that the file is actually going to register in
    the filesystem such that CFFILE will see it.

    Secondly, you have to assume that the filename on the server will be the same
    as it was when the user posted it. The make unique filename fuction will make
    this impossible.

    I don't think the page that this is posted to will return an HTML header until
    the file upload is complete. Therefore how are you going to open the second
    window? You can only post a form to 1 location. I suppose you could open
    another window and pass it the variables with an onClick event.

    You will not know the size of the file until the upload completes.

    I would call this impossible using a standard HTTP upload.

    I've seen things like this developed, but they either emplyed the use of
    activeX or a Java applet.

    Lupus 23 Guest

  8. #7

    Default Re: Upload Progress Bar

    Hmm you are brutally correct. Well then I have no choice I must aquire one of
    these active X or java applets. I know nothing of either one of these
    languages, how hard would it be to implement one? Does anyone have any code
    that does something of this sort? I want this feature, several users have
    requested it, and I will learn yet another programming language... if I have
    to, but I'd rather just plug in some code and have it work, with minimal
    ajustments.

    kenji776 Guest

  9. #8

    Default Re: Upload Progress Bar

    The only one I can think of off hand was the posting acceptor for the old
    Microsoft Site Server, which is now a defunkt product. But, I think you could
    likely Google for somthing that might work. I am sure you are not the first
    person to think of this.

    An alternative would be to provide an FTP location for your users.

    I think the development of such a tool would be somewhat difficult, as you
    would either have to know how to use an existing protocol (like FTP), or write
    your own.

    You might be better off lobbying the browser developers to include this into
    web browsers. ;)

    Lupus 23 Guest

  10. #9

    Default Re: Upload Progress Bar

    :disgust;

    Yes - Looking for the same upload progress bar function, and it doesn't seem
    to exist in CF, and exists in various tortured forms in ASP and other
    "languages" (spoken in Papuan New Guinea, that is, where the cannibals live).
    It amazes me that after all this time of developing web languages, we still
    don't have a conversation between client and server. Just a client requesting a
    page, and a server sending it back. Many, many websites have upload progress
    bar functions and download progress bars, I don't see why this should be such a
    difficult thing to achieve in CF and other tongues.

    Cyberadvan1 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