Project

General

Profile

Actions

Bug #38482

open

Accept "real" file uploads to /katello/api/repositories/:repository_id/content_uploads/:id

Added by Evgeni Golov 3 days ago. Updated 2 days ago.

Status:
Ready For Testing
Priority:
Normal
Assignee:
Category:
Content Uploads
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When uploading chunks using `PUT /katello/api/repositories/:repository_id/content_uploads/:id`, one can send the data as application/x-www-form-urlencoded and as multipart/form-data.
As urlencoded data is bigger, multipart is preferred.

Hammer seems to set "multipart: true" to RestClient in https://github.com/Katello/hammer-cli-katello/blob/1cb23adb604e2f8be56384a380666c22f5725bc6/lib/hammer_cli_katello/repository.rb#L535-L554
But while it's encoded as multipart, it's not flagged as a "file".

When using multipart uploads in Python (using requests), the controller receives a ActionDispatch::Http::UploadedFile (as requests always does "file" uploads), but never reads it, resulting in bad data being processed.

Actions #1

Updated by The Foreman Bot 3 days ago

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

Updated by Evgeni Golov 2 days ago

  • Description updated (diff)
Actions

Also available in: Atom PDF