16 May 21:40
Re: How to check file size before file upload completes?
From: Peter De Berdt <peter.de.berdt@...>
Subject: Re: How to check file size before file upload completes?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-16 19:40:00 GMT
Subject: Re: How to check file size before file upload completes?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-05-16 19:40:00 GMT
On 16 May 2008, at 20:09, nickname wrote:
Is it possible to check a file's size before a file upload completes?
We want to limit file uploads early by checking the header's content
length from the request object. The controller action and
before_filter doesn't seem to run until the file finishes uploading.
Use a Flash uploader, it will even do clientside filesize validation. SWFupload.org is one of them. They do have some gotchas with Rails cookie store and sessions, but you can find more information on that by searching the list archives.
Best regards
Peter De Berdt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
RSS Feed