1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-13 17:58:15 +00:00

Allow to display embed images/pdfs when SERVE_DIRECT was enabled on MinIO storage (#35882)

Releated issue: https://github.com/go-gitea/gitea/issues/30487

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
lifegpc
2025-11-10 13:31:25 +08:00
committed by GitHub
parent 60314cb688
commit 1c8c56503f
3 changed files with 31 additions and 5 deletions

View File

@@ -250,6 +250,7 @@ func (a *AzureBlobStorage) Delete(path string) error {
func (a *AzureBlobStorage) URL(path, name, _ string, reqParams url.Values) (*url.URL, error) {
blobClient := a.getBlobClient(path)
// TODO: OBJECT-STORAGE-CONTENT-TYPE: "browser inline rendering images/PDF" needs proper Content-Type header from storage
startTime := time.Now()
u, err := blobClient.GetSASURL(sas.BlobPermissions{
Read: true,