Merge branch 'features/attachment_server' of /home/git/repositories/gitlab/gitlabhq

This commit is contained in:
Dmitriy Zaporozhets 2013-02-16 12:45:20 +00:00
commit fa3cc1dd24
5 changed files with 28 additions and 2 deletions

View file

@ -0,0 +1,13 @@
class FilesController < ApplicationController
def download
note = Note.find(params[:id])
if can?(current_user, :read_project, note.project)
uploader = note.attachment
send_file uploader.file.path, disposition: 'attachment'
else
not_found!
end
end
end