🐛 Provide a way to bypass nexus and serving content to prevent nexus reverse proxy issue

This commit is contained in:
2024-11-06 23:01:29 +08:00
parent 2f99ac7b6e
commit c41f8b77ce
9 changed files with 6460 additions and 636 deletions

View File

@ -7,11 +7,8 @@ import (
"gorm.io/datatypes"
)
type AttachmentDst = int8
const (
AttachmentDstTemporary = AttachmentDst(iota)
AttachmentDstPermanent
AttachmentDstTemporary = 0 // The destination 0 is a reserved config for pre-upload processing
)
type Attachment struct {
@ -22,13 +19,13 @@ type Attachment struct {
// Unique ID is for storing (appear in local file name or object name)
Uuid string `json:"uuid"`
Size int64 `json:"size"`
Name string `json:"name"`
Alternative string `json:"alt"`
MimeType string `json:"mimetype"`
HashCode string `json:"hash"`
Destination AttachmentDst `json:"destination"`
RefCount int `json:"ref_count"`
Size int64 `json:"size"`
Name string `json:"name"`
Alternative string `json:"alt"`
MimeType string `json:"mimetype"`
HashCode string `json:"hash"`
Destination int `json:"destination"`
RefCount int `json:"ref_count"`
FileChunks datatypes.JSONMap `json:"file_chunks"`

View File

@ -12,7 +12,8 @@ type BaseDestination struct {
type LocalDestination struct {
BaseDestination
Path string `json:"path"`
Path string `json:"path"`
AccessBaseURL string `json:"access_baseurl"`
}
type S3Destination struct {