app/controllers/katello/api/v2/repositories_controller.rb in katello-4.2.0.rc1 vs app/controllers/katello/api/v2/repositories_controller.rb in katello-4.2.0.rc2
- old
+ new
@@ -358,9 +358,10 @@
param :id, :number, :required => true, :desc => N_("repository ID")
param :content, File, :required => true, :desc => N_("Content files to upload. Can be a single file or array of files.")
param :content_type, RepositoryTypeManager.uploadable_content_types(false).map(&:label), :required => false, :desc => N_("content type ('deb', 'docker_manifest', 'file', 'ostree', 'rpm', 'srpm')")
def upload_content
fail Katello::Errors::InvalidRepositoryContent, _("Cannot upload Container Image content.") if @repository.docker?
+ fail Katello::Errors::InvalidRepositoryContent, _("Cannot upload Ansible collections.") if @repository.ansible_collection?
filepaths = Array.wrap(params[:content]).compact.collect do |content|
{path: content.path, filename: content.original_filename}
end