-
Notifications
You must be signed in to change notification settings - Fork 43
/
config.sample.zh-CN.toml
114 lines (93 loc) · 3.85 KB
/
config.sample.zh-CN.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# =============================================================================
# UPGIT 配置
# =============================================================================
# 默认上传器
default_uploader = "github"
# 上传文件名的格式模板(仅特定上传器适配)
# / 目录分隔符, 作用: 是区分目录
# {year} 年份, 例如: 2022
# {month} 月份, 例如: 02
# {day} 天, 例如: 01
# {unix_ts} 时间戳, 例如: 1643617626
# {fname} 原始文件名,如 logo (不含后缀名)
# {fname_hash} {fname}的 MD5 散列值
# {ext} 文件后缀名, 例如.png
# 下面的例子生成的文件名预览: 2022/01/upgit_20220131_1643617626.png
# 如果目录不存在将会被程序自动创建
rename = "{year}/{month}/upgit_{year}{month}{day}_{unix_ts}{ext}"
# -----------------------------------------------------------------------------
# 自定义输出格式
# -----------------------------------------------------------------------------
# {url} 图片文件的网络URL地址
[output_formats]
"bbcode" = "[img]{url}[/img]"
"html" = '<img src="{url}" />'
"markdown-simple" = "![]({url})"
# -----------------------------------------------------------------------------
# 直链替换规则 RawUrl -[replace]-> Url
# -----------------------------------------------------------------------------
# 如果您的网络访问Github异常或者缓慢,您可以尝试下面的配置以开启CDN加速
# [replacements]
# "raw.githubusercontent.com" = "cdn.jsdelivr.net/gh"
# "/master" = "@master"
# =============================================================================
# 以下为各个上传器的配置示例. 用不到的留空即可
# =============================================================================
# Github 上传器
[uploaders.github]
# 保存文件的分支,例如 master 或 main
branch = "master"
# 您的拥有"repo"权限的 Github 令牌
# 获取Github Token连接: https://github.com/settings/tokens
pat = "ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# 您的公共Github存储库的名称
# 注意: 为了让您和他人可以访问到图片资源, 您的Github仓库一定要是公开的,
# 在私有仓库中Github会拦截未授权的请求,你将会得到一个404.
repo = "repo-name"
# 您的 Gtihub 用户名
username = "username"
# SMMS 上传器
[uploaders.smms]
# Get token from https://sm.ms/home/apitoken
token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Imgur 上传器
[uploaders.imgur]
# Get token from https://api.imgur.com/oauth2/addclient
# See your apps in https://imgur.com/account/settings/apps
client_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Chevereto Uploader
[uploaders.chevereto]
upload_url = "https://chevereto.com/api/v1/upload"
key = "c8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8"
# 腾讯云 COS
[uploaders.qcloudcos]
host = "xxx.cos.ap-chengdu.myqcloud.com"
secret_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
secret_key= "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# 七牛云存储
[uploaders.qiniu]
# Generate Token: http://jsfiddle.net/gh/get/extjs/4.2/icattlecoder/jsfiddle/tree/master/uptoken
token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=="
prefix = "https://cdn.mydomain.com/"
# Gitee
[uploaders.gitee]
username = "username"
repo = "repo-name"
# https://gitee.com/profile/personal_access_tokens/new
access_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
[uploaders.cloudinary]
cloud_name = "my_cloud"
upload_preset = "preset_name"
[uploaders.easyimage]
request_url = "https://img.545141.com/api/index.php"
token = "1c17b11693cb5ec63859b0ccccccccccc"
[uploaders.lskypro2]
host = "my_images_host"
token = "images_host_token"
[uploaders.s3]
region = "us-west-2"
bucket_name = "my-bucket"
access_key = "your-access-key"
secret_key = "your-secret-key"
endpoint = "https://s3.us-west-2.amazonaws.com"
url_format = "{endpoint}/{bucket}/{path}"