Serving custom public files = stop working #7522

Closed
opened 2025-11-02 07:28:33 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @mariuszmaximus on GitHub (Jun 29, 2021).

  • Gitea version (or commit ref): 1.15.0+dev-509-g2f3d3ac20
  • Git version: Git Version: 2.30.2, Wire Protocol Version 2 Enabled
  • Operating system: docker on ubuntu 19.10
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

...
In my opinion stop working "Serving custom public files" in "Customizing Gitea" https://docs.gitea.io/en-us/customizing-gitea/
I used gitea over "docker pull gitea/gitea"
a month ago it was working
when I put file to "$GITEA_CUSTOM/public/test.jpg" I can open it in http://my-gitea.com/test.jpg
a few days ago I updated and it stopped working

My current gitea
Using default tag: latest
latest: Pulling from gitea/gitea
Digest: sha256:b3011b077d5d2e8ce504755e2f373c86e784e30ce1068436a74f561de3f82a89
Status: Image is up to date for gitea/gitea:latest
docker.io/gitea/gitea:latest
0ab3ec073bb1d14b00779b0bfe2e0e287c504555323fa30a16b448a7d7e4d01f

Originally created by @mariuszmaximus on GitHub (Jun 29, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.15.0+dev-509-g2f3d3ac20 - Git version: Git Version: 2.30.2, Wire Protocol Version 2 Enabled - Operating system: docker on ubuntu 19.10 <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [X] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description <!-- If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services. --> ... In my opinion stop working "Serving custom public files" in "Customizing Gitea" https://docs.gitea.io/en-us/customizing-gitea/ I used gitea over "docker pull gitea/gitea" a month ago it was working when I put file to "$GITEA_CUSTOM/public/test.jpg" I can open it in http://my-gitea.com/test.jpg a few days ago I updated and it stopped working My current gitea Using default tag: latest latest: Pulling from gitea/gitea Digest: sha256:b3011b077d5d2e8ce504755e2f373c86e784e30ce1068436a74f561de3f82a89 Status: Image is up to date for gitea/gitea:latest docker.io/gitea/gitea:latest 0ab3ec073bb1d14b00779b0bfe2e0e287c504555323fa30a16b448a7d7e4d01f
GiteaMirror added the topic/distributiontype/questionissue/needs-feedback labels 2025-11-02 07:28:33 -06:00
Author
Owner

@noerw commented on GitHub (Jul 1, 2021):

It might be a file permission issue, if you're sure it's about the custom files in custom/public/.
We need gitea logs to get to the cause of this.

@noerw commented on GitHub (Jul 1, 2021): It might be a file permission issue, if you're sure it's about the custom files in `custom/public/`. We need [gitea logs](https://docs.gitea.io/en-us/logging-configuration/#debugging-problems) to get to the cause of this.
Author
Owner

@zeripath commented on GitHub (Jul 2, 2021):

I think this is related to the assets root pr

Try http://my-gitea.com/assets/test.jpg

@zeripath commented on GitHub (Jul 2, 2021): I think this is related to the assets root pr Try http://my-gitea.com/assets/test.jpg
Author
Owner

@lunny commented on GitHub (Jul 2, 2021):

PR #15219 move all assets under /assets

@lunny commented on GitHub (Jul 2, 2021): PR #15219 move all assets under `/assets`
Author
Owner

@mariuszmaximus commented on GitHub (Jul 2, 2021):

I confirm
$GITEA_CUSTOM/public/test.jpg is on http://my-gitea.com/assets/test.jpg

Please update Serving custom public files

For example, a file image.png stored in $GITEA_CUSTOM/public/, can be accessed with the url http://gitea.domain.tld/image.png

to:

For example, a file image.png stored in $GITEA_CUSTOM/public/, can be accessed with the url http://gitea.domain.tld/assets/image.png

@mariuszmaximus commented on GitHub (Jul 2, 2021): I confirm $GITEA_CUSTOM/public/test.jpg is on http://my-gitea.com/assets/test.jpg Please update [Serving custom public files](https://docs.gitea.io/en-us/customizing-gitea/#serving-custom-public-files) > For example, a file image.png stored in $GITEA_CUSTOM/public/, can be accessed with the url http://gitea.domain.tld/image.png `to:` > For example, a file image.png stored in $GITEA_CUSTOM/public/, can be accessed with the url http://gitea.domain.tld/assets/image.png
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7522