mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-30 06:16:37 +08:00
528240026d
- make format 现在与 code-check 使用同一格式化器(golangci-lint fmt),消除 goimports -local 与 gofumpt 的格式拉锯 - .golangci.yml 关闭默认 50/3 截断,完整上报所有问题(只增强不弱化) - 全库 gofumpt 规范化(203 files, 纯格式无行为变更)
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 = 0o755 // 上传目录权限
|
|
UploadFilePerm = 0o644 // 上传文件权限
|
|
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"
|
|
)
|