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.
on 2006-06-08 00:16
on 2006-06-08 17:40
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.