Path error using upload_content API

Community,

I’m trying to use the API to upload RPMS to a repository. Here is my curl:
curl -v -X POST -u “MYUSER:MYPASS” --cacert katello-server-ca.crt --data-urlencode “content@/path/node-exporter-1.6.1-1.el7.x86_64.rpm” --data-urlencode offset=0 https://MYSERVER/katello/api/repositories/20148/upload_content

I get the following error:
{“displayMessage”:“undefined method path' for #\u003cString:0x00007f79fa005e30\u003e\nDid you mean? pathmap","errors":["undefined method path’ for #\u003cString:0x00007f79fa005e30\u003e\nDid you mean? pathmap”]}%

Is this an API bug and I have to use a different API call or am I missing something in my curl?

Thanks

Hi @btanaka ,

Could you please post your Foreman and Katello versions?

Also, do you see a backtrace in the production logs that goes along with the undefined method error ?

Foreman: 3.1.3
Katello: 4.3.1

where and what log on the server would I find that error?

Thanks

Found it:
2023-10-24T12:51:37 [E|app|7602cb15] NoMethodError: undefined method path' for #<String:0x00007f79bc3ee828> 7602cb15 | Did you mean? pathmap 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/app/controllers/katello/api/v2/repositories_controller.rb:389:in block in upload_content’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/app/controllers/katello/api/v2/repositories_controller.rb:388:in collect' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/app/controllers/katello/api/v2/repositories_controller.rb:388:in upload_content’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/basic_implicit_render.rb:6:in send_action' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/base.rb:195:in process_action’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rendering.rb:30:in process_action' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/callbacks.rb:42:in block in process_action’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:112:in block in run_callbacks' 7602cb15 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in set_timezone’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in block in run_callbacks' 7602cb15 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in clear_thread’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in block in run_callbacks' 7602cb15 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in set_topbar_sweeper_controller’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in block in run_callbacks' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in around’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in block in run_callbacks' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.9.0/lib/audited/sweeper.rb:14:in around’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:121:in block in run_callbacks' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:139:in run_callbacks’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/callbacks.rb:41:in process_action' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/rescue.rb:22:in process_action’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:33:in block in process_action' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in block in instrument’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications/instrumenter.rb:24:in instrument' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/notifications.rb:180:in instrument’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/instrumentation.rb:32:in process_action' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal/params_wrapper.rb:245:in process_action’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/controller_runtime.rb:27:in process_action' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/app/controllers/katello/concerns/api/api_controller.rb:50:in process_action’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/abstract_controller/base.rb:136:in process' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionview-6.0.3.7/lib/action_view/rendering.rb:39:in process’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal.rb:190:in dispatch' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_controller/metal.rb:254:in dispatch’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:50:in dispatch' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:33:in serve’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/mapper.rb:18:in block in <class:Constraints>' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/mapper.rb:48:in serve’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:49:in block in serve' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in each’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in serve' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:834:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.7/lib/rails/engine.rb:527:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in public_send’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in method_missing' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/mapper.rb:19:in block in class:Constraints
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/mapper.rb:48:in serve' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:49:in block in serve’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in each' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/journey/router.rb:32:in serve’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/routing/route_set.rb:834:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/lib/katello/middleware/organization_created_enforcer.rb:18:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/lib/katello/middleware/event_daemon.rb:10:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-dsl-2.4.0/lib/apipie_dsl/static_dispatcher.rb:67:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/static_dispatcher.rb:66:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/extractor/recorder.rb:137:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in call’
7602cb15 | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in call' 7602cb15 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.17/lib/apipie/middleware/checksum_in_headers.rb:27:in call' 7602cb15 | /usr/share/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/etag.rb:27:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/head.rb:12:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/http/content_security_policy.rb:18:in call' 7602cb15 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in context' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/cookies.rb:648:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/callbacks.rb:27:in block in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/callbacks.rb:101:in run_callbacks' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/callbacks.rb:26:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/debug_exceptions.rb:32:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/show_exceptions.rb:33:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.7/lib/rails/rack/logger.rb:37:in call_app’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.7/lib/rails/rack/logger.rb:28:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in call’
7602cb15 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/remote_ip.rb:81:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/request_id.rb:27:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/lib/katello/prevent_json_parsing.rb:12:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/method_override.rb:24:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/runtime.rb:22:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/executor.rb:14:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/static.rb:126:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/actionpack-6.0.3.7/lib/action_dispatch/middleware/host_authorization.rb:76:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/secure_headers-6.3.0/lib/secure_headers/middleware.rb:11:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.7/lib/rails/engine.rb:527:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in public_send’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.7/lib/rails/railtie.rb:190:in method_missing' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in block in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in each' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in call’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/puma-5.5.0/lib/puma/configuration.rb:249:in call' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/puma-5.5.0/lib/puma/request.rb:77:in block in handle_request’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/puma-5.5.0/lib/puma/thread_pool.rb:340:in with_force_shutdown' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/puma-5.5.0/lib/puma/request.rb:76:in handle_request’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/puma-5.5.0/lib/puma/server.rb:447:in process_client' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/puma-5.5.0/lib/puma/thread_pool.rb:147:in block in spawn_thread’
7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in block in create_with_logging_context' 7602cb15 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.3.0/lib/logging/diagnostic_context.rb:474:in block in create_with_logging_context’

I found part of my issue. I had to add the following headers:
-H “Accept:application/json” -H “Content-Type:application/json”

now when i run the curl I get a 400 and:
{“status”:400,“error”:"There was a problem in the JSON you submitted: 783: unexpected token at

and then a bunch of text like this:
'\u0026content=%ED%AB%EE%DB%03%00%00%00%00%01node-exporter-1.6.1-1.el7%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%01%00%05%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%8E%AD%E8%01%00%00%00%00%00%00%00%07%00%00%04%90%00%00%00%3E%00%00%00%07%00%00%04%80%00%00%00%10%00%00%01%0C%00%00%00%07%00%00%00%00%00%00%02%1F%00%00%01%0D%00%00%00%06%00%00%02%1F%00%00%00%01%00%00%03%E8%00%00%00%04%00%00%02H%00%00%00%01%00%00%03%EA%00%00%00%07%00%00%02L%00%00%02%1F%00%00%03%EC%00%00%00%07%00%00%04k%00%00%00%10%00%00%03%EF%00%00%00%04%00%00%04%7C%00%00%00%01%89%02%1C%04%00%01%02%00%06%05%02e19%A2%00%0A%09%108%9ARF~1%C0%82%5D%A9%0F%FFL~2%ED%B0%17%EC%C6%8Dc%A8%F9h%5D%8D%11H%0B%BE%5E%1B%B0n%80%C5%5Dn%7FI%AF%E4%C4%DF%BE%B4%90f%FF%E7%E0%ECC%B7%F9%D9%7B%88Z%D8%1C%5Ba%24%A9%11%88%0C%F7%C3%0D%3F%19%E3%E2C%D1%8E%D5m%E8%92%0A9%1D%F8%EC%C36%E9%1A%AC%2B%3E%CD%8C%C86%01%C2%E7%D7%90%0D%E3%97%A8%B1%B1%29%00%23%2Fi%EA%15%DB%FBAL%25%03%89%D6%E9%E3%15u%A8%60%2BG%2C%CB%9C%B2%F6%9C%DE%94%3B%7D%A2%D2%9F%94%C2%3E%00D%07a%80%3Fm%E95%D7w%14%83%DBl%FAH%E1%D6%DE%E59%CC%A4%057J%16%29o%E2V%5E%92%28%F0N%83%BCg%8CV%97%E8%A9%06%12%3F8%95%D7%E2%13%AD%C9y%EEq%F7%BCt%E3e%13%A4%CC%ED%02%AC%13%3D%A1%E4%EE%28%BA%12%9F%A28u%97%29%B3%ECb%C5sG%93%E6%F6%7C%B5%7B%28%B4%A7%E4%9FY%16y%3D%F1%E1%7B%E2%93%9F%81%92e%A3%D7%A5%16%B8%C0R%C4%E5%CA%C5K%09%E7%C1%05L%04%A9%22%85G0Q%09%E1%1E%EE%9F0%B1%DC%1D%1C%CB%FCe%2Cv%07Si%EF%D6%5C2%0C4%93%8Dt%98%C2%E7b%D4%9E%8FS%07J%C9%FC%DD%B6%27%03%1A%E1%8B%E1%D8%23%C9uJ%88%2CV%A2%11%85%CF%EC%27%AC%BB%7Fa%93%86%DC%ABbC%DE%5D%81%7C%3E%B6%3D%BF%2B%89f%9

Changing the content type to Content-Type:multipart/form-data returns me to the path error…so I guess I’m back where I started

I believe you were on the right track using JSON as the data type. Can I see how you formatted the json data in the curl command?

curl -H “Accept:application/json” -H “Content-Type:multipart/form-data”
-X POST -u USER:PASS
–cacert katello-server-ca.crt
-d ‘{“content_type”: “rpm”}’
–data-urlencode “content@node-exporter-1.6.1-1.el7.x86_64.rpm”
https://MYSERVER/katello/api/repositories/20148/upload_content

I was trying to find docs on that API route – I did find some docs among the Satellite ones. However, it uses some alternative API routes. I’m gonna try the upload_content one myself, but in the meantime, this might be helpful: Chapter 5. Using the Red Hat Satellite API Red Hat Satellite 6.10 | Red Hat Customer Portal

I dug in the code and reminded myself that the upload_content URL is used by the UI – it sounds like we have some Rails magic that gets the file data in the correct shape for that specific endpoint.

The content_uploads endpoint mentioned in the docs I linked, on the other hand, is used by hammer – I would go that route instead. Plus, it has chunking support in case you need to upload bigger RPMs.

For some more explanation, we use something called Rack to get the files uploading right for that upload_content endpoint. You end up seeing something like the following json if you upload content via the API:

{:path=>"/tmp/RackMultipart20231025-17684-zz7z3.rpm", :filename=>"ModemManager-1.10.8-3.el8.x86_64.rpm"}

The code chunks the RPMs for you.

Some more raw data to show off the middleware doing its thing:

19:35:48 rails.1   | 2023-10-25T19:35:48 [I|app|33caa7d8] Started POST "/katello/api/v2/repositories/1/upload_content" for 192.168.122.1 at 2023-10-25 19:35:48 +0000
19:35:48 rails.1   | 2023-10-25T19:35:48 [I|app|33caa7d8] Processing by Katello::Api::V2::RepositoriesController#upload_content as HTML
19:35:48 rails.1   | 2023-10-25T19:35:48 [I|app|33caa7d8]   Parameters: {"content"=>[#<ActionDispatch::Http::UploadedFile:0x00007f5c1cfebe40 @tempfile=#<Tempfile:/tmp/RackMultipart20231025-17684-zz7z3.rpm>, @original_filename="ModemManager-1.10.8-3.el8.x86_64.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"ModemManager-1.10.8-3.el8.x86_64.rpm\"\r\nContent-Type: application/x-rpm\r\n">], "authenticity_token"=>"C31Bv6Qk4hdlt0lZ1iTvdawZ6YlVOGntMu9ZPLI8-ArvaULkN6UzrHYlCrgLJ4PWcoZc2-0VliVjIt3VsRBE_Q", "api_version"=>"v2", "id"=>"1"}

Anyway, I hope that helps explain why I think you should try the content_uploads/ endpoints instead.

Thanks so much! That make sense. And thanks for the link! I was trying to make those API calls work also and had issues with syntax and such.

1 Like