Thanks, Dominic...I'll check out the Flash recommendation. Rick
-----Original Message----- From: Dominic Watson [mailto:watson.domi...@googlemail.com] Sent: Saturday, September 12, 2009 6:22 AM To: cf-talk Subject: Re: Is this possible with component methods in cf8? Looks like ajax file uploads are a tricky thing - the trick being tracking the progress of the upload (which, while you don't want a status bar, is vital for knowing when to start the next file). Here's a good expo by the looks of things: http://stackoverflow.com/questions/166221/how-to-upload-file-jquery The SWFUpload flash method is really very good and flexible - the only visual element of flash is the 'Upload' button and the file picker dialog (which is a default OS file picker that allows true filtering of file types and multiple selection). The rest can be done with html and css. Dominic 2009/9/12 Rick Faircloth <r...@whitestonemedia.com> > > Hi, Barney...and thanks for the reply... > > I didn't actually want a loading progress indicator in terms of > something that shows how much of a file has uploaded. > > I just want to return the info after each file has finished loading > and processing, but doing so over and over until all the photos > were processed. I was thinking of something that would simply > tell the user that photo xyz had finished uploading, various > sizes had been created, etc., after the that process finishes > for each photo. Just some kind of running notifications to keep > them "in the loop" on what's happening. (And that something is > *still* happening, so they don't bother the browser). > > After initiating a multiple photo uploading, the user would get > something like this: > > (a few seconds pass, then, via ajax, display...) > - photo01.jpg has been uploaded and thumbnails have been created > > (a few seconds pass, then, via ajax, display...) > - photo02.jpg has been uploaded and thumbnails have been created > > (a few seconds pass, then, via ajax, display...) > - photo03.jpg has been uploaded and thumbnails have been created > > etc., etc., until all submitted photos have been uploaded and processed. > > I just couldn't think of a way to return info such as the > uploaded file name, etc., from a component method, *multiple times*. > > I thought perhaps I could somehow *loop* the image process routine, > *including* the cfreturn, so I could get info back to the browser. > I didn't know if that were possible, so I thought I'd just ask before > starting trying to code a solution that might not even be possible. > > Perhaps I could somehow use a couple of processing methods that do the same > thing, and when one is finished, have it return info for an image > processed, > and then trigger then second method to process an image and return info, > which then triggers the first to process another photo, etc., until all the > photos were processed. > > I don't know...just trying to think of a way to get this done using > component > methods or even another way. > > Rick > > > -----Original Message----- > From: Barney Boisvert [mailto:bboisv...@gmail.com] > Sent: Saturday, September 12, 2009 12:54 AM > To: cf-talk > Subject: Re: Is this possible with component methods in cf8? > > > You can't send anything back to the user until all the photos are > uploaded, but once that's done, you can just leave them on disk, > record the fact that they're there in session scope, and return a > response after kicking off a background thread to process the images. > That background thread should update the same session scope data > structures, which you can interrogate via Ajax requests to update the > user on progress. > > If you need status updates while the actual upload is happening, > you'll have to use a Flash uploader or something > > cheers, > barneyb > > On Fri, Sep 11, 2009 at 9:48 PM, Rick Faircloth<r...@whitestonemedia.com> > wrote: > > > > What I'd like to do concerns uploading and processing images which > sometimes > > takes > > > > awhile and leaves the user wondering what's happening while they're > waiting. > > > > > > > > If the user is uploading, say 10 photos, and all the photos have to be > > resized into two different > > > > images, renamed, saved, etc., the process can take some time. > > > > > > > > I was wondering if I could set up a method of process 1 images, then > return > > the name of the > > > > image to the user via ajax, with a message such as "Image house1.jpg > > processed.", then when > > > > image two has been uploaded and processed, "Image house2.jpg processed", > > etc. until all > > > > images have been processed. > > > > > > > > This would keep the user informed of the progress and keep them from > > worrying that the > > > > process was hanging up. > > > > > > > > So, the question is, can messages (via cfreturn) be sent back to the > client > > multiple times > > > > from a method? Or perhaps there's a different way to achieve this? > > > > > > > > Any suggestions or ideas? > > > > > > > > Thanks, > > > > > > > > Rick > > > > > > > > > > ---------------------------------------------------------------------------- > > --------------------------------------- > > > > "Those who hammer their guns into plows will plow for those who do not." > - > > Thomas Jefferson > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326245 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4