2023-02-23 20:45:57 +08:00
package aliyundrive_open
import (
2025-07-01 09:54:50 +08:00
"github.com/OpenListTeam/OpenList/v4/internal/driver"
"github.com/OpenListTeam/OpenList/v4/internal/op"
2023-02-23 20:45:57 +08:00
)
type Addition struct {
2024-11-08 22:07:35 +08:00
DriveType string ` json:"drive_type" type:"select" options:"default,resource,backup" default:"resource" `
2023-02-23 20:45:57 +08:00
driver . RootID
2023-08-01 21:50:25 +08:00
RefreshToken string ` json:"refresh_token" required:"true" `
OrderBy string ` json:"order_by" type:"select" options:"name,size,updated_at,created_at" `
OrderDirection string ` json:"order_direction" type:"select" options:"ASC,DESC" `
2025-06-17 22:13:28 +08:00
UseOnlineAPI bool ` json:"use_online_api" default:"true" `
APIAddress string ` json:"api_url_address" default:"https://api.oplist.org/alicloud/renewapi" `
ClientID string ` json:"client_id" help:"Keep it empty if you don't have one" `
ClientSecret string ` json:"client_secret" help:"Keep it empty if you don't have one" `
2023-08-01 21:50:25 +08:00
RemoveWay string ` json:"remove_way" required:"true" type:"select" options:"trash,delete" `
RapidUpload bool ` json:"rapid_upload" help:"If you enable this option, the file will be uploaded to the server first, so the progress will be incorrect" `
InternalUpload bool ` json:"internal_upload" help:"If you are using Aliyun ECS is located in Beijing, you can turn it on to boost the upload speed" `
LIVPDownloadFormat string ` json:"livp_download_format" type:"select" options:"jpeg,mov" default:"jpeg" `
AccessToken string
2023-02-23 20:45:57 +08:00
}
var config = driver . Config {
2023-03-05 15:36:12 +08:00
Name : "AliyundriveOpen" ,
LocalSort : false ,
OnlyLocal : false ,
OnlyProxy : false ,
NoCache : false ,
NoUpload : false ,
NeedMs : false ,
DefaultRoot : "root" ,
NoOverwriteUpload : true ,
2023-02-23 20:45:57 +08:00
}
2025-01-18 23:26:58 +08:00
var API_URL = "https://openapi.alipan.com"
2023-02-23 20:45:57 +08:00
func init ( ) {
op . RegisterDriver ( func ( ) driver . Driver {
2025-01-18 23:26:58 +08:00
return & AliyundriveOpen { }
2023-02-23 20:45:57 +08:00
} )
}