Project

General

Profile

Actions

Bug #14819

closed

Can't upload repository content via API

Added by Partha Aji almost 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1329292
Description of problem:
Cannot upload content into repository via API, receiving 500 Error NoMethodError: undefined method `collect' for #<ActionDispatch::Http::UploadedFile:0x007fa0505974a8> | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.18/app/controllers/katello/api/v2/repositories_controller.rb:266:in `upload_content'

Version-Release number of selected component (if applicable):
Sat6.2 Beta Snap9

How reproducible:
Always

Steps to Reproduce:
1. Make sure you have some product with repo.
2. Try to upload repo content via API (POST /katello/api/repositories/:id/upload_content)
3.

Actual results:
2016-04-21 17:20:19 - nailgun.client - DEBUG - Making HTTP POST request to https://example.com/katello/api/v2/repositories/248/upload_content with options {'files': {'content': <open file '/home/andrii/workspace/robottelo/tests/foreman/data/which-2.19-6.el6.x86_64.rpm', mode 'rb' at 0x7f7bf27dbed0>}, 'verify': False, 'auth': ('admin', '***')} and no data.
2016-04-21 17:20:20 - nailgun.client - WARNING - Received HTTP 500 response: {"displayMessage":"undefined method `collect' for #\u003cActionDispatch::Http::UploadedFile:0x007fa0505974a8\u003e","errors":["undefined method `collect' for #\u003cActionDispatch::Http::UploadedFile:0x007fa0505974a8\u003e"]}

Expected results:
Content was uploaded successfully

Additional info:
Works as expected via CLI

Actions #1

Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5997 added
Actions #2

Updated by Eric Helms almost 8 years ago

  • translation missing: en.field_release set to 86
Actions #3

Updated by Anonymous almost 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF