Skip to content
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

Images in Wiki repo not showing in Gitea Wiki #4690

Closed
2 of 7 tasks
bkahlerventer opened this issue Aug 13, 2018 · 12 comments · Fixed by #5814
Closed
2 of 7 tasks

Images in Wiki repo not showing in Gitea Wiki #4690

bkahlerventer opened this issue Aug 13, 2018 · 12 comments · Fixed by #5814
Labels
Milestone

Comments

@bkahlerventer
Copy link

Description

Not much to describe. Image is in main repository to view. Image in wiki repository main folder, image subfolder, images subfolder, raw subfolder. None of the images are displayed in the wiki.

Screenshots

Not neccessary, view page on https://try.gitea.io/bkahlerventer/wiki_test/wiki/Home

@ancoroc
Copy link

ancoroc commented Aug 13, 2018

Can confirm. Had a struggle with this because showing images failed in 1.4.3 too. I get HTTP error 404 when accessing images within the wiki.
Maybe related to #4395 and #4376.

@bkahlerventer
Copy link
Author

I can confirm this is also broken in Gogs

@lunny lunny added this to the 1.6.0 milestone Aug 14, 2018
@lafriks lafriks modified the milestones: 1.6.0, 1.7.0 Sep 16, 2018
@lafriks lafriks modified the milestones: 1.7.0, 1.8.0 Dec 27, 2018
techknowlogick pushed a commit that referenced this issue Feb 6, 2019
* Fix serving of raw wiki files other than .md

Closes #4690.
Closes #4395.

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Simplify code at routers/repo/wiki.go

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Add more files to user2/repo1.wiki for testing

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Update macaron to v1.3.2

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Add tests for WikiRaw

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Fix NewResponseWriter usage due to macaron update

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>

* Add raw to reserved wiki names

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
@igadmg
Copy link

igadmg commented May 24, 2019

as of version 1.8.1 that bug seem to be not fixed.

I have uploaded images to raw/image.png to a *.wiki.git repository and it is still 404

@lafriks
Copy link
Member

lafriks commented May 24, 2019

Seems to be working for provided example in issue description

@ancoroc
Copy link

ancoroc commented Jun 17, 2019

I am having trouble verifying the fix too...
Please see https://try.gitea.io/298374289734/WikiTest/wiki/Home for an example.
Expected to see the image in the subfolder but can't find a way referencing it correctly.

Any help is appreciated.

1 similar comment
@ancoroc
Copy link

ancoroc commented Jun 17, 2019

I am having trouble verifying the fix too...
Please see https://try.gitea.io/298374289734/WikiTest/wiki/Home for an example.
Expected to see the image in the subfolder but can't find a way referencing it correctly.

Any help is appreciated.

@lunny
Copy link
Member

lunny commented Jun 17, 2019

@ancoroc The wiki git repo is not the same code git repo. If you want to reference an image on code repo, you have to give it an external link.

@ancoroc
Copy link

ancoroc commented Jun 18, 2019

Ok, thanks for the explanation. So no possibility at this time to compose the wiki with pages, subpages and images in subfolders?

@lunny
Copy link
Member

lunny commented Jun 18, 2019

@ancoroc You could push image on wiki git repo in fact and reference it with relative path.

@ancoroc
Copy link

ancoroc commented Jun 18, 2019

@lunny You mean like I tried in https://try.gitea.io/298374289734/WikiTest/wiki/Home ? Didn't work for me either. Relative paths and absolute URLs didn't do the trick.

@mattandneil
Copy link

mattandneil commented Feb 3, 2020

This works in Gitea version 1.10.2:

  1. Save a new wiki page
  2. Clone the wiki repository (http://localhost/org/repo.wiki.git)
  3. Commit an image into the root directory and push to remote
  4. Edit the wiki page and use the following markup: ![title](../raw/image.jpg)

@donnyv
Copy link

donnyv commented Jul 27, 2020

@bigassforce This only works if the image is in a public repository. If not a dialog box will pop up asking for a log in.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants