mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 22:06:38 +08:00
9a18bea324
Move storage backend configuration from startup YAML to system_config-backed runtime configuration. Add local, S3-compatible, R2, MinIO, OSS, and WebDAV backend support. Add a storage migration async task using the existing task dispatch framework. Migration target config is carried in task payload, and maintenance mode is derived from task execution state. Split upload file management and storage operations, add the admin storage configuration tab, and update migrations and Swagger docs.
19 lines
577 B
Go
19 lines
577 B
Go
// Copyright 2026 Arctel.net
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package upload
|
|
|
|
import "github.com/Rain-kl/Wavelet/internal/storage"
|
|
|
|
const (
|
|
maxUploadSize = 32 * 1024 * 1024 // 32MB
|
|
detectContentBytes = 512 // http.DetectContentType 需要的最小字节数
|
|
uploadDirPerm = 0755 // 上传目录权限
|
|
uploadFilePerm = 0644 // 上传文件权限
|
|
imageQualityLow = "low"
|
|
imageQualityMedium = "medium"
|
|
imageQualityHigh = "high"
|
|
imageQualityOrigin = "origin"
|
|
storageDriverLocal = string(storage.DriverLocal)
|
|
)
|