Feat: generate upload credentials for upyun

This commit is contained in:
HFO4
2020-01-17 14:05:51 +08:00
parent 3da87ba7cf
commit f7ecbce64c
5 changed files with 135 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/HFO4/cloudreve/pkg/filesystem/qiniu"
"github.com/HFO4/cloudreve/pkg/filesystem/remote"
"github.com/HFO4/cloudreve/pkg/filesystem/response"
"github.com/HFO4/cloudreve/pkg/filesystem/upyun"
"github.com/HFO4/cloudreve/pkg/request"
"github.com/HFO4/cloudreve/pkg/serializer"
"github.com/gin-gonic/gin"
@@ -175,6 +176,11 @@ func (fs *FileSystem) dispatchHandler() error {
HTTPClient: request.HTTPClient{},
}
return nil
case "upyun":
fs.Handler = upyun.Driver{
Policy: currentPolicy,
}
return nil
default:
return ErrUnknownPolicyType
}