I have been thinking about a few of the new features in Flash 10.  One of
those is the ability to load files into memory on the client.  So you could
load the image as a byte array on the client and use a remote object call to
send the data to CF do the resize then all your waiting on is the result
event and you can do whatever else you need to in the mean time.

At the moment my idea is theory but I think this will work.

Here is some reading on how to read files with Flash 10.
http://www.mikechambers.com/blog/2008/08/20/reading-and-writing-local-files-
in-flash-player-10/

Paul Kukiel


-----Original Message-----
From: Stefan Richter [mailto:[email protected]] 
Sent: Thursday, February 19, 2009 4:21 PM
To: flex
Subject: Offloading long running processes


Hi all,
I'm uploading a file to a CFM page from Flex. The uploaded file needs  
to be converted and this conversion can take a while. I want to free  
the Flex app from locking the user into pending state while the  
conversion takes place.

Right now I have:
1) User uploads file via Flex app
2) CFM receives the file and copies it to a specified directory
3) using cfscript and com object I start the conversion
4) once conversion is done (can be 2 minutes or more) the page returns  
the conversion info from the COM object (failure, success etc) to Flex  
in form of XML
5) converted file is now ready to be loaded into Flex


I'd like to make a change and inform the user as soon as the file is  
uploaded, but then kick off my conversion process somehow so it can  
run without the user being in a pending state. What are my options?
I don't mind logging conversion status to a database and poll that  
every 10 seconds or so, but how does the CF side work in terms of  
kickstarting the conversion process after file upload and returning a  
status to the right away?
Should I simply run a scheduled script which checks for a conversion  
queue in the database and handles them? I guess that's an option but  
ideally I'd like the conversion process to be kicked off by the CFM  
file that handles the upload so that conversion can start immediately.

Any tips appreciated.

Many thanks,

Stefan





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5765
Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to