Implemented the /thumbnail/PACKAGE url

Returns a 160x120 thumbnail image if possible
Returns a dummy image and a 404 status code otherwise.
This commit is contained in:
Christoph Haas 2015-04-19 12:56:58 +02:00
parent 8b0ff06172
commit c085df9eed
3 changed files with 32 additions and 0 deletions

View file

@ -19,6 +19,7 @@ Debshots::Application.routes.draw do
post 'upload_image/:name' => 'packages#upload_image', as: :upload_image
get 'delete_screenshot/:name/:id' => 'packages#delete_screenshot', as: :delete_screenshot
get 'about' => 'welcome#about'
get 'thumbnail/:name' => 'packages#thumbnail', as: :thumbnail_image
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".