-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wiki: Files are not downloadable #27121
Comments
Something is wrong with method WebPathToGitPath in file ./services/wiki/wiki_path.go |
@BElluu Thanks a lot. But if I do that, I get a 404 |
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: For reference, this is the wiki markdown file I created for testing ( Welcome to the Wiki.
[Test file](files/test-file.zip "An ordinary test file") |
In Wiki pages, short-links created to local Wiki files were always expanded as regular Wiki Links. In particular, if a link wanted to point to a file that Gitea doesn't know how to render (e.g, a .zip file), a user following the link would be silently redirected to the Wiki's home page. This change makes short-links* in Wiki pages be expanded to raw wiki links, so these local wiki files may be accessed without manually accessing their URL. * only short-links ending in a file extension that isn't renderable are affected. Closes go-gitea#27121. Signed-off-by: Rafael Girão <[email protected]>
In Wiki pages, short-links created to local Wiki files were always expanded as regular Wiki Links. In particular, if a link wanted to point to a file that Gitea doesn't know how to render (e.g, a .zip file), a user following the link would be silently redirected to the Wiki's home page. This change makes short-links* in Wiki pages be expanded to raw wiki links, so these local wiki files may be accessed without manually accessing their URL. * only short-links ending in a file extension that isn't renderable are affected. Closes go-gitea#27121. Signed-off-by: Rafael Girão <[email protected]>
Since it's not by design in previous versions, I think feature is a better label for this issue. |
In Wiki pages, short-links created to local Wiki files were always expanded as regular Wiki Links. In particular, if a link wanted to point to a file that Gitea doesn't know how to render (e.g, a .zip file), a user following the link would be silently redirected to the Wiki's home page. This change makes short-links* in Wiki pages be expanded to raw wiki links, so these local wiki files may be accessed without manually accessing their URL. * only short-links ending in a file extension that isn't renderable are affected. Closes #27121. Signed-off-by: Rafael Girão <[email protected]> Co-authored-by: silverwind <[email protected]>
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
The text was updated successfully, but these errors were encountered: