mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-30 06:16:37 +08:00
43dc97e48c
- Moved cmd/, core/, plugins/, pkg/, downstream/, and main.go into backend/ directory - Batch updated all Go source files to import github.com/Rain-kl/Wavelet/backend/... - Updated Makefile, scripts/swagger.sh, architecture guards, and platform skills - Passed all quality gates (100% tests, 0 lint issues, clean build)
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"
|
|
)
|