Attached images cannot be opened

We recently implemented Gitea and encountered the following problem:

If an image (in this case, a .jpg) is attached to a pull request or similar, it is created on the server but without the .jpg extension.

The problem with this is that the file cannot be opened later. This means that if I want to view the attached image at the end, I would go to [IP]:3000/attachments/[name of image], but the browser does not redirect to a valid image that can be opened.

Is there a solution to this?