mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 22:06:38 +08:00
fb6a3edb89
- Physically purged all legacy internal/ packages, centralized pkg/model/ and pkg/repository/ - Migrated domain models and database repositories into self-contained owner plugins (user, auth, message_gateway, admin, upload, risk_control) - Decoupled cross-plugin interactions via pure core/contracts and typed EventBus - Ensured 100% test coverage pass, zero data races (-race clean), and 0 lint issues in make code-check
26 lines
932 B
Go
26 lines
932 B
Go
// Copyright 2026 Arctel.net
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package shared
|
|
|
|
// Upload size, path, media quality, and cache constants shared across subpackages.
|
|
const (
|
|
MaxUploadSize = 32 * 1024 * 1024 // 32MB
|
|
DetectContentBytes = 512 // http.DetectContentType 需要的最小字节数
|
|
UploadDirPerm = 0755 // 上传目录权限
|
|
UploadFilePerm = 0644 // 上传文件权限
|
|
ImageQualityLow = "low"
|
|
ImageQualityMedium = "medium"
|
|
ImageQualityHigh = "high"
|
|
ImageQualityOrigin = "origin"
|
|
DefaultPublicUploadType = "avatar"
|
|
FileStatsTrendDays = 7
|
|
MaxS3KeyLength = 1024
|
|
AccessCacheTTL = 5 // seconds; multiplied by time.Second at use site
|
|
|
|
UploadStatDimensionTotal = "total"
|
|
UploadStatDimensionType = "type"
|
|
UploadStatDimensionCategory = "category"
|
|
UploadStatDimensionTrend = "trend"
|
|
)
|