mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-18 17:38:07 +08:00

* fix(crypt): bug caused by link cache * perf(crypt,mega,halalcloud,quark,uc): optimize concurrent response link * chore: 删除无用代码 * ftp * 修复bug;资源释放 * 添加SyncClosers * local,sftp,smb * 重构,优化,增强 * Update internal/stream/util.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: j2rong4cn <36783515+j2rong4cn@users.noreply.github.com> * chore * chore * 优化,修复bug * . --------- Signed-off-by: j2rong4cn <36783515+j2rong4cn@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
32 lines
932 B
Go
32 lines
932 B
Go
package dropbox
|
|
|
|
import (
|
|
"github.com/OpenListTeam/OpenList/v4/internal/driver"
|
|
"github.com/OpenListTeam/OpenList/v4/internal/op"
|
|
)
|
|
|
|
type Addition struct {
|
|
driver.RootPath
|
|
UseOnlineAPI bool `json:"use_online_api" default:"false"`
|
|
APIAddress string `json:"api_url_address" default:"https://api.oplist.org/dropboxs/renewapi"`
|
|
ClientID string `json:"client_id" required:"false" help:"Keep it empty if you don't have one"`
|
|
ClientSecret string `json:"client_secret" required:"false" help:"Keep it empty if you don't have one"`
|
|
AccessToken string
|
|
RefreshToken string `json:"refresh_token" required:"true"`
|
|
RootNamespaceId string
|
|
}
|
|
|
|
var config = driver.Config{
|
|
Name: "Dropbox",
|
|
NoOverwriteUpload: true,
|
|
}
|
|
|
|
func init() {
|
|
op.RegisterDriver(func() driver.Driver {
|
|
return &Dropbox{
|
|
base: "https://api.dropboxapi.com",
|
|
contentBase: "https://content.dropboxapi.com",
|
|
}
|
|
})
|
|
}
|