class Files < Merb::Controller def start render :layout => :none end def index @args = params render :action => 'start' end def upload puts params.inspect FileUtils.mv params[:data][:tempfile].path, Merb::Server.config[:dist_root]+"/public/files/#{params[:data][:filename]}" render_no_layout end def progress puts params.inspect Mongrel::Uploads.debug = true @upstatus = Mongrel::Uploads.check(params[:upload_id]) render_js 'progress' end def file send_file params[:file] end end