-
-
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
Link to attachment via copy & paste not correct #17057
Comments
What is your Are you running gitea behind a reverse proxy with some url-rewriting? |
It is:
Yes. The apache config looks like:
|
I am a coworker of @nsolthe and I have copied the gitea instance with this problem to another Linux machine to investigate, if our reverse proxy is causing this. For this copy I used a dump and the original config file with just minor changes and of course no reverse proxy. Here is the output from a diff of both used config files:
For me, only ROOT_URL seems to be of interest here. Without a reverse proxy that adds Hope that helps to find this little problem. |
I met this problem on v1.15.6. I just copied a image and pasted into the issue editor, but image url was broken.
|
Could you reproduce it on https://try.gitea.io ? |
Since we fixed the url base for the links in repositories we no longer need to add the appsuburl to pasted image links. Fix go-gitea#17057 Signed-off-by: Andrew Thornton <art27@cantab.net>
Sorry this is due to us changing the base url for absolute path links from within repositories. Previously these would be relative to the host but now they're relative to the repository. Thus the appsuburl is no longer needed and is in fact incorrect. |
* Remove appSubUrl from pasted images Since we fixed the url base for the links in repositories we no longer need to add the appsuburl to pasted image links. Fix #17057 Signed-off-by: Andrew Thornton <art27@cantab.net>
Backport go-gitea#17572 * Remove appSubUrl from pasted images Since we fixed the url base for the links in repositories we no longer need to add the appsuburl to pasted image links. Fix go-gitea#17057 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove appSubUrl from pasted images Since we fixed the url base for the links in repositories we no longer need to add the appsuburl to pasted image links. Fix go-gitea#17057 Signed-off-by: Andrew Thornton <art27@cantab.net>
https://dl.gitea.io/gitea/1.15.2/gitea-1.15.2-linux-amd64.xz
)systemd
servicegitea.log
Description
I'm working on a Windows PC.
While creating an issue or creating/editing a comment I like to add screenshots. I copy the image file by selecting it in the file explorer, press "Ctrl + c" on keyboard, change to Windows Edge where I am creating the comment, press "Ctrl + v" after the cursor is in the location where I want the image.
The image gets added as and the link is added after file upload completes. When selecting preview the image does not get displayed but I see a "broken image link" pictogram.
I have noticed that I need to edit the automatically generated link from
/gitea/attachments/<image_id>
to/attachments/<image_id>
and then I get the image preview.Images added in older comments/issues are currently displayed with the "broken image link" pictogram.
It seems that there have been some changes to how the links are being created.
Hosting environment
We are using an apache as reverse proxy for http to https redirect.
The gitea base-URL is configured as:
https://<hostname>/gitea/
Screenshots
The text was updated successfully, but these errors were encountered: