|
|
@@ -5,7 +5,6 @@ |
|
|
|
package repo |
|
|
|
|
|
|
|
import ( |
|
|
|
"code.gitea.io/gitea/modules/storage" |
|
|
|
"fmt" |
|
|
|
"net/http" |
|
|
|
"strings" |
|
|
@@ -14,11 +13,10 @@ import ( |
|
|
|
"code.gitea.io/gitea/modules/context" |
|
|
|
"code.gitea.io/gitea/modules/log" |
|
|
|
"code.gitea.io/gitea/modules/setting" |
|
|
|
"code.gitea.io/gitea/modules/storage" |
|
|
|
"code.gitea.io/gitea/modules/upload" |
|
|
|
) |
|
|
|
|
|
|
|
const MINIO_STORAGE_TYPE = "minio" |
|
|
|
|
|
|
|
func RenderAttachmentSettings(ctx *context.Context) { |
|
|
|
renderAttachmentSettings(ctx) |
|
|
|
} |
|
|
@@ -148,7 +146,7 @@ func GetAttachment(ctx *context.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
//If we have matched and access to release or issue |
|
|
|
if setting.Attachment.StoreType == MINIO_STORAGE_TYPE { |
|
|
|
if setting.Attachment.StoreType == storage.MinioStorageType { |
|
|
|
url, err := storage.Attachments.PresignedGetURL(attach.RelativePath(), attach.Name) |
|
|
|
if err != nil { |
|
|
|
ctx.ServerError("PresignedGetURL", err) |
|
|
|