[Backgroundrb-devel] example code for file upload

Ezra Zygmuntowicz ezmobius at gmail.com
Fri Mar 30 12:00:59 EDT 2007

On Mar 29, 2007, at 8:18 PM, Walter McGinnis wrote:

> I have an archiving application that handles large file uploads.  I
> already use backgroundrb to run a behind the scenes bulk import of
> records.  All good.  Thank you Ezra.
> Now I would like to add long running file uploads to the things that
> backgroundrb does for me.  That's right that ole chestnut.  I've seen
> a lot of mention of this practice around the web, but have yet come
> across good example code about how this is done.  At least not beyond
> the ajax progress bar aspect.
> I guess I'm looking for answer to how one gets the stream of the
> uploading file submitted by the user from mongrel to a backgroundrb
> before the upload actually completes?
> Cheers,
> Walter

Hey Walter-

	You don't. BackgrounDrb cannot handle file uploads. You probably  
want to look at the mongrel_upload_progress gem. Bdrb can do progress  
bars for tasks it runs but the cotnrol flow of http requests and  
rails does not allow you to do anything with the file stream until  
its fully uploaded already so bdrb never has a chance to get involved.


-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)

More information about the Backgroundrb-devel mailing list