Merge branch 'main' into wwq

This commit is contained in:
bx1834938347-prog 2026-01-06 10:59:00 +08:00
commit 4abc02807b
2 changed files with 11 additions and 1 deletions

View File

@ -224,7 +224,7 @@ func UpdateWorkVideo(ctx *gin.Context) {
service.Error(ctx, errors.New("图片鉴定未通过")) service.Error(ctx, errors.New("图片鉴定未通过"))
return return
}*/ }*/
if req.VideoUrl != "" { if req.VideoUrl != "" && false {
//请求接口判断 //请求接口判断
fileResp, errs := service.FilesProvider.GetFileSecurityStatus(ctx, &files.GetFileSecurityStatusReq{ fileResp, errs := service.FilesProvider.GetFileSecurityStatus(ctx, &files.GetFileSecurityStatusReq{
Url: req.VideoUrl, Url: req.VideoUrl,

View File

@ -4,6 +4,7 @@ import (
"bytes" "bytes"
"context" "context"
"errors" "errors"
"fmt"
"fonchain-fiee/api/files" "fonchain-fiee/api/files"
"fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service"
"fonchain-fiee/pkg/service/bundle/common" "fonchain-fiee/pkg/service/bundle/common"
@ -102,6 +103,15 @@ func Create(ctx *gin.Context) {
} }
func Delete(ctx *gin.Context) { func Delete(ctx *gin.Context) {
path := ctx.DefaultQuery("path", "/")
nowYear := time.Now().Year()
nowMonth := time.Now().Month()
nowYearPath := fmt.Sprintf("/fiee/video/%d", nowYear)
nowMonthPath := fmt.Sprintf("/fiee/video/%d/%d-%d", nowYear, nowYear, nowMonth)
if path == nowYearPath || path == nowMonthPath || path == "/fiee" || path == "/fiee/video" || path == "/fiee/video/old" {
service.Error(ctx, errors.New("无法删除该目录"))
return
}
resp, err := service.FilesProvider.Delete(ctx, &files.DeleteReq{ resp, err := service.FilesProvider.Delete(ctx, &files.DeleteReq{
Path: ctx.DefaultQuery("path", "/"), Path: ctx.DefaultQuery("path", "/"),
UserSpacePath: getUserSpacePath(ctx), UserSpacePath: getUserSpacePath(ctx),