gitlab-org--gitlab-foss/app/controllers/files_controller.rb

9 lines
234 B
Ruby
Raw Normal View History

2013-02-11 14:31:19 -05:00
class FilesController < ApplicationController
def download
uploader = Note.find(params[:id]).attachment
uploader.retrieve_from_store!(params[:filename])
send_file uploader.file.path, disposition: 'attachment'
end
end