mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: get policy from directory props / Feat: return source enabled flag in file list
This commit is contained in:
@@ -25,13 +25,6 @@ func (service *UploadCredentialService) Get(ctx context.Context, c *gin.Context)
|
||||
return serializer.Err(serializer.CodePolicyNotAllowed, err.Error(), err)
|
||||
}
|
||||
|
||||
// 存储策略是否一致
|
||||
if service.Type != "" {
|
||||
if service.Type != fs.User.Policy.Type {
|
||||
return serializer.Err(serializer.CodePolicyNotAllowed, "存储策略已变更,请刷新页面", nil)
|
||||
}
|
||||
}
|
||||
|
||||
ctx = context.WithValue(ctx, fsctx.GinCtx, c)
|
||||
credential, err := fs.GetUploadToken(ctx, service.Path, service.Size, service.Name)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user