Skip to content

Commit

Permalink
Support /file requests as an alias for /image
Browse files Browse the repository at this point in the history
  • Loading branch information
mocoso committed Jan 24, 2010
1 parent 192af5b commit fa9f2a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/showoff.rb
Expand Up @@ -112,10 +112,10 @@ def update_commandline_code(slide)
erb :index
end

get '/image/*' do
img_file = params[:splat].join('/')
img = File.join(options.pres_dir, img_file)
send_file img
get %r{(?:image|file)/(.*)} do
path = params[:captures].first
full_path = File.join(options.pres_dir, path)
send_file full_path
end

get '/slides' do
Expand Down

0 comments on commit fa9f2a5

Please sign in to comment.