Debian repository: dedicated upload route for direct uploads
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=390197) </details> <!--IssueSummary end--> ## :fire: Problem In https://gitlab.com/gitlab-org/gitlab/-/merge_requests/101838, the ~"Debian Repository" was updated to support direct uploads of `*.deb` and `*.udeb` files. The upload route for that, was the existing one: `PUT projects/:id/packages/debian/:file_name`. As we can see, the `:file_name` needs to be supplied by users. We end up with a command like: ``` $ curl -T file.deb "http://<username>:<password>@<host+port>/api/v4/projects/<project_id>/packages/debian/<mandatory_file_name>.deb?distribution=$codename&component=main" ``` It would be a nicer ~UX to have ``` $ curl -T file.deb "http://<username>:<password>@<host+port>/api/v4/projects/<project_id>/packages/debian?distribution=$codename&component=main" ``` ## :fire_engine: Solution * Implement a new route for `PUT` with no filename. * Add support for that route in workhorse. * Handle the file the exact same way that https://gitlab.com/gitlab-org/gitlab/-/merge_requests/101838 handles it. * Update the ~documentation. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114951. Doubts: * In the `/authorize` endpoint, is there a way to get the filename? I doubt it since it's a body upload. * This means we can't have a check on the filename.
issue