add file storage: metadata schema, minio upload/download, content-type extension mapping
- add files_metadata and files_metadata_connections tables with CRUD helpers - add FileMetadata type and Sha256Hash typedef; replace Media struct - add minio upload, presigned download URL, and key generation - fix bucket existence check to use FileStorageBucketName instead of hardcoded "main" - fix files_metadata_connections table name and trailing comma in DDL - fix column name original -> name in files_metadata schema - add canonical MIME-to-extension map with .unk fallback - add FileDownloadLinkTtl constant (24h)
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package globals
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
MaxDirectMsgCache uint32 = 12
|
||||
FileStorageBucketName string = "communicator"
|
||||
MaxDirectMsgCache uint32 = 12
|
||||
FileStorageBucketName string = "communicator"
|
||||
FileDownloadLinkTtl time.Duration = 24 * time.Hour
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user