Forum: Ruby on Rails Upload to DB hang mentioned in wiki

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
72003cf388f6f7f95b433de3df9ccd38?d=identicon&s=25 Larrytheliquid (Guest)
on 2006-06-07 22:16
(Received via mailing list)
I'm uploading files to a mysql database, using a mediumblob size.
Following the wiki here:
http://wiki.rubyonrails.org/rails/pages/HowtoUploadFiles ,
I got past the first mysql 500kb limitation with the max_allowed_packet
= xM
trick, setting it to 1000M.
However, as the person at the very bottom of the wiki notes, I too
cannot
upload more than around 10mb.
I also tried the suggested workaround: <%= hidden_field 'value',
'1000000'
%> in the same form as my binary file_field.
Substituting 'value' for the same name as my binary field, and other
random
words didn't help either.
My intuition says that Rails will expect a specific name like
max_in_kilobytes or whatnot, or that the suggestion is wrong entirely.
Any
help?
Thanks.
72003cf388f6f7f95b433de3df9ccd38?d=identicon&s=25 Larrytheliquid (Guest)
on 2006-06-08 15:40
(Received via mailing list)
Okay..I found the requierd line in a google cached earlier version of
the
wiki. I also did some more googleing and found that this has to directly
precede the file field. So, I now have:
<p><label for="data_file_data">Data</label><br/>
<input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
<%= file_field 'data_file', 'data'  %></p>
(I would have used <%= hidden_field 'MAX_FILE_SIZE', '1000000' %>, but
this
didn't work either..)

For uploads greater than around 10mb, the upload still hangs and nothing
happens.
This topic is locked and can not be replied to.