Skip to content

Cannot download attachments of draft releases #31362

Closed
@TobiLabu

Description

@TobiLabu

Description

Since version 1.22.0 it is not possible to download files attached to releases that are flagged as draft. This used to work up until version 1.21.11.

Steps to reproduce:

  1. Open any repo with activated releases
  2. Go to release page
  3. Create a new release
  4. Add an attachment to the release
  5. Save release as draft
  6. Try to download the attached file

I'd expect the browser to download / open the file. Instead nothing happens (dev tools show a 404 is returned).

I have prepared a script that reproduces the issue using docker containers, see https://github.com/TobiLabu/reproduce-gitea-issue.
You can set the version of Gitea in the .env file to verify that this used to work in earlier versions.

Please let me know if any info is missing.

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

https://gist.github.com/TobiLabu/3e661a79630a574313988fa415427408

Screenshots

No response

Git Version

2.45.1

Operating System

Linux

How are you running Gitea?

I have reproduced the issue at https://demo.gitea.com/ as well as on a private dockerized instance and a fresh instance using Docker Compose.

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions