2020-10-24 23:57:45 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Projects
|
|
|
|
module Packages
|
|
|
|
class PackageFilesController < ApplicationController
|
|
|
|
include PackagesAccess
|
|
|
|
include SendFileUpload
|
|
|
|
|
2021-01-03 14:25:43 +05:30
|
|
|
feature_category :package_registry
|
|
|
|
|
2020-10-24 23:57:45 +05:30
|
|
|
def download
|
|
|
|
package_file = project.package_files.find(params[:id])
|
|
|
|
|
2022-10-11 01:57:18 +05:30
|
|
|
package_file.package.touch_last_downloaded_at
|
2020-10-24 23:57:45 +05:30
|
|
|
send_upload(package_file.file, attachment: package_file.file_name)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|