Skip to content

Instantly share code, notes, and snippets.

@Syd
Created February 13, 2009 05:46
Show Gist options
  • Save Syd/63067 to your computer and use it in GitHub Desktop.
Save Syd/63067 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
get '/' do
haml :index
end
post '/' do
params[:upload][:tempfile].read
end
use_in_file_templates!
__END__
@@index
%form{:method=>"post",:action=>"/",:enctype=>"multipart/form-data"}
%input{:name=>"upload", :type=>"file"}
%input{:type=>"submit"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment