Skip to content

Wiki: Files are not downloadable #27121

@bauermarkus

Description

@bauermarkus

Description

I tried to provide some files in the wiki via the link markdown

So I cloned the repo, I added a new folder, added the files and linked them as described here

When you click the link, the wiki opens a new page

Gitea Version

1.20.1

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker

Database

None

Activity

added
issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implemented
on Sep 19, 2023
BElluu

BElluu commented on Sep 19, 2023

@BElluu
Contributor

Something is wrong with method WebPathToGitPath in file ./services/wiki/wiki_path.go
@bauermarkus if you need access to your files in wiki pages, for now you can create link like this:
For example, if your main branch is named master, files is directory in root
[Link name](/raw/branch/master/files/MyFile.pdf "Test Alt text")

bauermarkus

bauermarkus commented on Oct 27, 2023

@bauermarkus
Author

@BElluu Thanks a lot. But if I do that, I get a 404

rafaelsgirao

rafaelsgirao commented on Mar 11, 2024

@rafaelsgirao
Contributor

I'm interested in fixing this bug and would like to open a pull request soon.

I managed to reproduce this locally and made a proof-of-concept fix, which, at first glance, seems to work:
Relative links to files which are not registered as renderable by Gitea now feature a raw link instead of a regular wiki link.

Before:
image

After:
image

For reference, this is the wiki markdown file I created for testing ( Home.md ):

Welcome to the Wiki.

[Test file](files/test-file.zip "An ordinary test file")
removed
pr/wipThis PR is not ready for review
on Mar 27, 2024
added 2 commits that reference this issue on Apr 1, 2024
5829c92
b333693
added
type/featureCompletely new functionality. Can only be merged if feature freeze is not active.
and removed on Apr 10, 2024
added this to the 1.23.0 milestone on Apr 10, 2024
lunny

lunny commented on Apr 10, 2024

@lunny
Member

Since it's not by design in previous versions, I think feature is a better label for this issue.

added a commit that references this issue on Apr 10, 2024
c1f76ae
locked as resolved and limited conversation to collaborators on Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/featureCompletely new functionality. Can only be merged if feature freeze is not active.

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @lunny@rafaelsgirao@BElluu@bauermarkus@denyskon

    Issue actions

      Wiki: Files are not downloadable · Issue #27121 · go-gitea/gitea