-
Notifications
You must be signed in to change notification settings - Fork 43
/
config.sample.toml
109 lines (90 loc) · 3.91 KB
/
config.sample.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
# =============================================================================
# UPGIT Config
# =============================================================================
# default uploader id
default_uploader = "github"
# The file name formatting template is applied when uploading
# / is directory separator used to distinguish directories
# {year} Year, for example: 2022
# {month} Month, for example: 02
# {day} Day, for example: 01
# {unix_ts} Time stamp, for example: 1643617626. If you're uploading frequently, try {unix_tsms} to escape name repeating
# {fname} Original file name, such as logo (without suffix)
# {fname_hash} MD5 hash value of {fname}
# {ext} File name suffix, for example: .png
# The following example generates a file name like: 2022/01/upgit_20220131_1643617626.png
rename = "{year}/{month}/upgit_{year}{month}{day}_{unix_ts}{ext}"
# -----------------------------------------------------------------------------
# Custom extra output formats
# -----------------------------------------------------------------------------
# {url} direct URL of the file
[output_formats]
"bbcode" = "[img]{url}[/img]"
"html" = '<img src="{url}" />'
"markdown-simple" = "![]({url})"
# -----------------------------------------------------------------------------
# URL replacing rules. Process: RawUrl -[replace]-> Url
# -----------------------------------------------------------------------------
# If your network access to Github is abnormal or sluggish, you can try the following CDN acceleration.
# [replacements]
# "raw.githubusercontent.com" = "cdn.jsdelivr.net/gh"
# "/master" = "@master"
# =============================================================================
# Configurations examples for some uploaders, leave them blank if not used
# =============================================================================
# Github uploader
[uploaders.github]
# Branch to save files, for example master or main
branch = "master"
# "pat" enter the Github token that has the "repo" permission
# Get token from https://github.com/settings/tokens
pat = "ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# The name of your public Github repository
# Attention: In order for you and others to access image resources, your Github repository must be public.
# In private repositories Github blocks unauthorized requests and you will get a 404.
repo = "repo-name"
# your Github username
username = "username"
# SMMS Uploader
[uploaders.smms]
# Get token from https://sm.ms/home/apitoken
token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Imgur Uploader
[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]
key = "c8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8"
upload_url = "https://chevereto.com/api/v1/upload"
# Qcloudcos Uploader
[uploaders.qcloudcos]
host = "xxx.cos.ap-chengdu.myqcloud.com"
secret_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
secret_key= "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
# Qiniu cloud
[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"
# S3 Uploader
[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}"