2020-07-21 08:09:30 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Projects
|
|
|
|
module Packages
|
|
|
|
class PackageFilesController < ApplicationController
|
|
|
|
include PackagesAccess
|
|
|
|
include SendFileUpload
|
|
|
|
|
2020-10-08 14:08:32 -04:00
|
|
|
feature_category :package_registry
|
|
|
|
|
2020-07-21 08:09:30 -04:00
|
|
|
def download
|
|
|
|
package_file = project.package_files.find(params[:id])
|
|
|
|
|
|
|
|
send_upload(package_file.file, attachment: package_file.file_name)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|