移除静态文件支持:删除静态资源目录相关代码和 Dockerfile 配置

This commit is contained in:
2026-01-27 16:22:21 +08:00
parent e12d912a6c
commit 6052af8357
3 changed files with 3 additions and 9 deletions

View File

@@ -34,9 +34,6 @@ func SetupRouter(webFS embed.FS) *gin.Engine {
// Swagger
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
// 静态文件
r.Static("/static", "./static")
api := r.Group("/api/v1")
{
// 公共接口

View File

@@ -242,9 +242,8 @@ func (f *Fetcher) saveVariant(ctx context.Context, img *model.Image, variant, fo
func (f *Fetcher) saveDailyFiles(srcImg image.Image, originalData []byte) {
util.Logger.Info("Saving daily files")
localRoot := config.GetConfig().Storage.Local.Root
if config.GetConfig().Storage.Type != "local" {
// 如果不是本地存储,保存在静态资源目录
localRoot = "static"
if localRoot == "" {
localRoot = "data"
}
if err := os.MkdirAll(localRoot, 0755); err != nil {