同步包路径与路由,去掉 SPA 构建步骤,对齐 Gitea 式 LICENSE,并更新规格/规则与占位 SSR。 Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
419 B
Go
19 lines
419 B
Go
package services
|
|
|
|
import (
|
|
"mime/multipart"
|
|
)
|
|
|
|
var allowedImageExt = map[string]bool{
|
|
".jpg": true,
|
|
".jpeg": true,
|
|
".png": true,
|
|
".gif": true,
|
|
".webp": true,
|
|
}
|
|
|
|
// SaveUploadedImage 保存图片到当前存储后端,返回公开 URL
|
|
func SaveUploadedImage(store *UploadStore, file *multipart.FileHeader, category, namePrefix string) (string, error) {
|
|
return store.SaveImage(file, category, namePrefix)
|
|
}
|