I have a multi-step form inspired by this railcast that has 3 file upload images. However when I upload an image I receive an error can't dump File.
From searching in forums I saw posts saying that saving a file uploads in the session doesn't work so I need to use something like this:
This however doesn't seem to work. Should I look through the three file uploads and clear them every time? How can I avoid this error?
Here is my create function from my controller:
session[:post_params].deep_merge!(params[:post]) if params[:post]
session[:duration] = params[:post_duration] if params[:post_duration]
@post = Post.new(session[:post_params])
@post.current_step = session[:post_step]
logger.info("attachment " + @post.assets.first.attachment.inspect)
session[:post_step] = session[:post_params] = nil
redirect_to @post and return
session[:post_step] = @post.current_step
Thank you for reading.
This topic is now closed. New replies are no longer allowed.