diff options
Diffstat (limited to 'views/index.haml')
-rw-r--r-- | views/index.haml | 14 |
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>" |