Hi
I have a form for importing a csv file. With every entry in my CSV I do a delayed background call from a webservice and the result is then saved to my database. This is working great!
Now I tried a CSV file with over 400 rows. After clicking import in my form it takes some time and then I get the following error message: 'ActionDispatch::Cookies::CookieOverflow'. But nevertheless 300 of the 400 jobs are already created in my delayed_jobs table.
The code below is copied from other threads, so I don't really know where I save something in cookies. I guess it is at 'file.tempfile' in the controller, but I am not sure.
How can I avoid that error? I found something about using session_store instead of cookie_store, but I don't know how to do that.
I have the following in my controller:
file = params[:file] CSV.new(file.tempfile, {:headers => false, :col_sep => ";"}).each do |row| @list << row[1] end end
and this in my view:
<%=form_tag '/importcsv/csv_import', :multipart => true do%> <%= file_field_tag "file" %><br/> <%= submit_tag("Import") %> <% end %>
Cheers, Sebastian