Upload LFS file directly when open SERVE_DIRECT config option #7729

Open
opened 2025-11-02 07:34:45 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @ABNER-1 on GitHub (Aug 23, 2021).

  • Gitea version (or commit ref): 1.15.0+rc3
  • Git version: git version 2.30.1
  • Operating system: ubuntu18.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

None

Description

The rest part of issuse #16711
Implement uploading lfs file when open SERVE_DIRECT config option.
some answers about details https://github.com/go-gitea/gitea/issues/16711#issuecomment-902735589

Originally created by @ABNER-1 on GitHub (Aug 23, 2021). - Gitea version (or commit ref): 1.15.0+rc3 - Git version: git version 2.30.1 - Operating system: ubuntu18.04 <!-- 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 - [x] MySQL - [ ] MSSQL - [ ] 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 --> None ## Description The rest part of issuse #16711 Implement uploading lfs file when open SERVE_DIRECT config option. some answers about details https://github.com/go-gitea/gitea/issues/16711#issuecomment-902735589
GiteaMirror added the type/enhancementtopic/lfs labels 2025-11-02 07:34:45 -06:00
Author
Owner

@zeripath commented on GitHub (Aug 23, 2021):

Docker latest isn't a version.

Do you mean 1.15.0?

@zeripath commented on GitHub (Aug 23, 2021): Docker latest isn't a version. Do you mean 1.15.0?
Author
Owner

@ABNER-1 commented on GitHub (Aug 23, 2021):

I have updated the version of gitea

@ABNER-1 commented on GitHub (Aug 23, 2021): I have updated the version of gitea
Author
Owner

@ABNER-1 commented on GitHub (Aug 23, 2021):

I try to add x-amz-content-sha256, and this will help us to verify the upload file is consistent with the file sha256.
(I test by editing the source code of minio rudely. If sha256 is inconsistent in signature & header & file content sha, it cause 503 error, and will not found this resource in minio.)

However, I have some questions about this.

  1. Why verify action is optional?
  2. If have no verify action, how can gitea know the upload phase is over and try to write a meta information?
@ABNER-1 commented on GitHub (Aug 23, 2021): I try to add `x-amz-content-sha256`, and this will help us to verify the upload file is consistent with the file sha256. (I test by editing the source code of minio rudely. If sha256 is inconsistent in signature & header & file content sha, it cause 503 error, and will not found this resource in minio.) However, I have some questions about this. 1. Why verify action is optional? 2. If have no verify action, how can gitea know the upload phase is over and try to write a meta information?
Author
Owner

@lunny commented on GitHub (Aug 23, 2021):

Hm, should we use another config option but not still use SERVE_DIRECT?

@lunny commented on GitHub (Aug 23, 2021): Hm, should we use another config option but not still use `SERVE_DIRECT`?
Author
Owner

@ABNER-1 commented on GitHub (Aug 23, 2021):

I can accept it.

The config doc config-cheat-sheet describe it regardless of upload or download. But splitting it to two options is ok because they both may be suitable for different situation.

However, on my opinion, the SERVE_DIRECT may be called like UPLOAD/DOWNLOAD_SERVE_DIRECT because this will make user know more clearly.

@ABNER-1 commented on GitHub (Aug 23, 2021): I can accept it. The config doc [config-cheat-sheet](https://docs.gitea.io/en-us/config-cheat-sheet/) describe it regardless of upload or download. But splitting it to two options is ok because they both may be suitable for different situation. However, on my opinion, the SERVE_DIRECT may be called like UPLOAD/DOWNLOAD_SERVE_DIRECT because this will make user know more clearly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7729