summaryrefslogtreecommitdiff
path: root/views/index.haml
blob: 51e47813024a6476538e2a2852021a4826018b55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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>"