mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: upyun callback & authentication
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
type UploadCredentialService struct {
|
||||
Path string `form:"path" binding:"required"`
|
||||
Size uint64 `form:"size" binding:"min=0"`
|
||||
Name string `form:"name"`
|
||||
}
|
||||
|
||||
// Get 获取新的上传凭证
|
||||
@@ -23,7 +24,7 @@ func (service *UploadCredentialService) Get(ctx context.Context, c *gin.Context)
|
||||
}
|
||||
|
||||
ctx = context.WithValue(ctx, fsctx.GinCtx, c)
|
||||
credential, err := fs.GetUploadToken(ctx, service.Path, service.Size)
|
||||
credential, err := fs.GetUploadToken(ctx, service.Path, service.Size, service.Name)
|
||||
if err != nil {
|
||||
return serializer.Err(serializer.CodeNotSet, err.Error(), err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user