Upload progress form not redirecting when finished

Carl Youngblood
2005-12-14T01:11:41Z

Hello, I have an upload action in one of my controllers that looks like this:

upload_status_for :upload
def upload
	if @request.post?
		# do some stuff
		upload_progress.message = "Processing uploaded files..."
		session.update
		# do some more stuff
		upload_progress.message = "#{num_saved} resume(s) processed..."
		session.update
		# do some more stuff
		upload_progress.message = "#{num_saved} resume(s) uploaded
successfully"
		finish_upload_status = "#{num_saved} resume(s) uploaded
successfully"
		session.update
		if num_saved > 0
			redirect_to :action => :index
		end
	end
end

The operation finishes successfully, but the user never gets
redirected to the index action.  Just in case it''s important, here is
the relevant section of the view code:

<%= form_tag_with_upload_progress({:action => ''upload''},
        {:finish => ''uploadstatus.innerHTML = "Document
Uploaded"''}) %>

<%= file_field_tag ''zipfile'', {:size => 30} %>

<%= submit_tag(''Upload resumes'') %>

<%= upload_status_tag %>
<%= end_form_tag %>

Is there something wrong with my code?

Thanks,

Carl