Skip to content

Generic Packages Repository, put multiple files in the same package/version #21517

Closed
@danielezelante

Description

@danielezelante

Description

I tried to publish a package version and upload a file as shown in:
https://docs.gitea.io/en-us/packages/generic/
PUT https://gitea.example.com/api/packages/{owner}/generic/{package_name}/{package_version}/{file_name}

When I upload the first file using curl in the new package/version, all is right, but when I try to upload another file (with a different name) to the same package/version, I got this error: 400 Bad Request

On server, gitea.log contains:
2022/10/19 23:00:57 ...packages/packages.go:159:createPackageAndVersion() [E] [63506587-2] Error inserting package: Package version already exists
2022/10/19 23:00:57 ...ges/helper/helper.go:32:LogAndProcessError() [D] [63506587-2] Package version already exists

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.31.1

Operating System

RHEL9

How are you running Gitea?

systemd https://dl.gitea.io/gitea/1.17.3/gitea-1.17.3-linux-amd64

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions