2023-02-23 12:45:57 +00:00
package aliyundrive_open
import (
"github.com/alist-org/alist/v3/internal/driver"
"github.com/alist-org/alist/v3/internal/op"
)
type Addition struct {
2024-11-08 14:07:35 +00:00
DriveType string ` json:"drive_type" type:"select" options:"default,resource,backup" default:"resource" `
2023-02-23 12:45:57 +00:00
driver . RootID
2023-08-01 13:50:25 +00: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" `
2023-10-10 10:13:58 +00:00
OauthTokenURL string ` json:"oauth_token_url" default:"https://api.nn.ci/alist/ali_open/token" `
2023-08-01 13:50:25 +00:00
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" `
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 12:45:57 +00:00
}
var config = driver . Config {
2023-03-05 07:36:12 +00:00
Name : "AliyundriveOpen" ,
LocalSort : false ,
OnlyLocal : false ,
OnlyProxy : false ,
NoCache : false ,
NoUpload : false ,
NeedMs : false ,
DefaultRoot : "root" ,
NoOverwriteUpload : true ,
2023-02-23 12:45:57 +00:00
}
2025-01-18 15:26:58 +00:00
var API_URL = "https://openapi.alipan.com"
2023-02-23 12:45:57 +00:00
func init ( ) {
op . RegisterDriver ( func ( ) driver . Driver {
2025-01-18 15:26:58 +00:00
return & AliyundriveOpen { }
2023-02-23 12:45:57 +00:00
} )
}