If you're trying to upload the w/ a simple file_field, the browser is going to wait for the entire file to finish uploading before it considers the request finished. Most of the time you can't even handle files larger than 10mb reliably with these means (I can't remember if it's a browser limitation or a server limitation). Really, what you want is some way to finish the request immediately, but have the file continue to upload in the background. Ideally, you should send periodic feedback to the browser on the progress of the upload.

BackgroundRB is good, but may be overkill in this instance. Have you tried looking at this?
http://sean.treadway.info/demo/upload/

On Feb 23, 2007, at 4:47 PM, Nick Zadrozny wrote:

Hey all,

I thought I'd take advantage of the impressive volume lately by
posting a question on something that has stumped me lately: Large-ish
file uploads.

I'm doing a Rails reboot for my church's website, and every week they
upload the audio for their Sunday messages. We're talking 10-20MB
files. They had a pretty straightforward upload form in their previous
PHP site, and I have since built a new one in Rails using
acts_as_attachment.

Testing locally works fine. But, of course, when uploading to the
staging site from their office the upload just dies. It times out, I'd
guess, but I could be wrong. I haven't put a whole lot of effort into
logging and troubleshooting quite yet, because I'm not entirely sure
where to start.

Part of the problem, I think, is that the site is hosted on DreamHost.
That means Apache+FCGI, and not a whole lot of flexibility (that I can
tell) in getting around that. I'm vaguely familiar with Merb and I'd
like to try it, but I'm not sure if I can get it running on DreamHost.

Anyway, enough blabbing. Has anyone else had experience like this with
largeish file uploads? Particularly uploads on DreamHost? I'm going to
keep poking around, but any input would be welcome.

--
Nick Zadrozny • http://missionsbridge.org/people/nick
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to