summaryrefslogtreecommitdiff
path: root/views/index.haml
blob: b9d78e77f2eeff4abb8f7f783b12c8f49d2b14bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%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
%ul
  - @files.each do |file|
    %li= "<a href='files/#{file}'>#{file}</a>"