Report abuse


			
Controller
----------

class UploadFilesController < ApplicationController

  def new

  end

  def upload
    file = File.new("testfile.test", "wr")
!!    file.write(params[:video].read)
    file.save
    file.close

  end

end

View
----

New video

<%= start_form_tag({:action => 'upload'}, {:multipart => true}) %> <%= file_field_tag "video" %> <%= text_field "video", "description" %> <%= submit_tag 'Create' %> <%= end_form_tag %> <%= link_to 'Back', :action => 'list' %>