Clint Pachl wrote:> I used to use <input type="hidden"
name="MAX_FILE_SIZE" value="100000"
> /> in my PHP days, but it doesn''t seem to work with Rails. I
always
> thought MAX_FILE_SIZE was an HTML spec, but upon a little research, it
> looks like it is PHP specific. Can anyone confirm?
>
> Anyway, I want to prohibit a user from uploading large files. For
> instance, the user has the option to upload 10 images, each to be less
> than 100K (1MB total).
>
> -pachl
No, the max file size on the client side is browser specific and may be
most modern browsers don''t takes care of it.
On the server side, there was (there is) a php max file upload - But
this limit can only be hit when the full transfer is done (meaning,
bandwidth have been consumed) - So, you certainly can check this on
rails side and delete any temp file if their size does not satisfy your
policy.
There is also an apache POST max size (which is something like 10MB by
default but I don''t remember where the setting is likely to be found on
httpd.conf)
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---