Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
i configured the [storage] section of configuration so that save most huge file on Minio (Cloudflare R2).
(set SERVE_DIRECT = true)
I have a repository that tracing a .pdf file as LFS. After I pushed this repository and previewed this pdf file on gitea website. the browser simply downloaded the PDF without providing an inline preview.
Then I created a demo that test the performance of pdfobj (the previewer gitea used) on Minio.I found That:
The Content-Disposition must set to inline
Content-type should be application/pdf
in Minio url header.
There is a demo on my private site, http://64.112.41.7/test/test_lfs/
I’ve addressed this issue in my fork, but the fix involved numerous code changes to implement my solution. I’m uncertain whether this approach is optimal.
Description
i configured the [storage] section of configuration so that save most huge file on Minio (Cloudflare R2). (set SERVE_DIRECT = true)
I have a repository that tracing a .pdf file as LFS. After I pushed this repository and previewed this pdf file on gitea website. the browser simply downloaded the PDF without providing an inline preview.
Then I created a demo that test the performance of pdfobj (the previewer gitea used) on Minio.I found That:
Content-Disposition
must set toinline
Content-type
should beapplication/pdf
in Minio url header.
There is a demo on my private site,
http://64.112.41.7/test/test_lfs/
I’ve addressed this issue in my fork, but the fix involved numerous code changes to implement my solution. I’m uncertain whether this approach is optimal.
Gitea Version
1.23.0+dev-129-gef3941f2e and 1.21.10
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-compose and gitea:nightly or gitea:latest
Database
SQLite