summaryrefslogtreecommitdiff
path: root/views/index.haml
diff options
context:
space:
mode:
authorTobias Bühlmann <tobias.buehlmann@gmx.de>2010-04-25 13:46:42 +0200
committerTobias Bühlmann <tobias.buehlmann@gmx.de>2010-04-25 13:46:42 +0200
commitd4ccdf736f536b420aceeb6cb8589495cd2e4a34 (patch)
treee6d5120836028ae2bbd4b96d3d64f1bb2f7c4e83 /views/index.haml
initial commit
Diffstat (limited to 'views/index.haml')
-rw-r--r--views/index.haml14
1 files changed, 14 insertions, 0 deletions
diff --git a/views/index.haml b/views/index.haml
new file mode 100644
index 0000000..51e4781
--- /dev/null
+++ b/views/index.haml
@@ -0,0 +1,14 @@
+%h1 Sinatra File Upload
+
+- if @flash
+ = @flash
+
+%form{:action => '/upload', :method => 'post', :enctype => 'multipart/form-data'}
+ %p<
+ %input{:type => 'file', :name => 'file'}
+ %p<
+ %input{:type => 'submit', :value => 'Upload'}
+
+%h3 Files
+- @files.each do |file|
+ = "<a href='files/#{file}'>#{file}</a>"