mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
feat: get file source link in batch
This commit is contained in:
@@ -80,6 +80,8 @@ const (
|
||||
CodeInvalidChunkIndex = 400012
|
||||
// CodeInvalidContentLength 无效的正文长度
|
||||
CodeInvalidContentLength = 400013
|
||||
// CodeBatchSourceSize 超出批量获取外链限制
|
||||
CodeBatchSourceSize = 40014
|
||||
// CodeDBError 数据库操作失败
|
||||
CodeDBError = 50001
|
||||
// CodeEncryptError 加密失败
|
||||
|
||||
@@ -76,3 +76,11 @@ func BuildObjectList(parent uint, objects []Object, policy *model.Policy) Object
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
// Sources 获取外链的结果响应
|
||||
type Sources struct {
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Parent uint `json:"parent"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ type group struct {
|
||||
ShareDownload bool `json:"shareDownload"`
|
||||
CompressEnabled bool `json:"compress"`
|
||||
WebDAVEnabled bool `json:"webdav"`
|
||||
SourceBatchSize int `json:"sourceBatch"`
|
||||
}
|
||||
|
||||
type tag struct {
|
||||
@@ -98,6 +99,7 @@ func BuildUser(user model.User) User {
|
||||
ShareDownload: user.Group.OptionsSerialized.ShareDownload,
|
||||
CompressEnabled: user.Group.OptionsSerialized.ArchiveTask,
|
||||
WebDAVEnabled: user.Group.WebDAVEnabled,
|
||||
SourceBatchSize: user.Group.OptionsSerialized.SourceBatchSize,
|
||||
},
|
||||
Tags: buildTagRes(tags),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user