Skip to content

Commit 40bb0bf

Browse files
committed
Update docs about attachment path (go-gitea#26883)
This change was caused by go-gitea#26271, for configuration as below: ``` [attachment] ENABLE = true PATH = data/attachments MAX_SIZE = 100 MAX_FILES = 5 ``` Before go-gitea#26271, the resolved path is ${AppWorkPath}/${attachments.PATH} (such as `/var/lib/gitea/data/attachments`) After go-gitea#26271, the resolved path is ${AppDataPath}/${attachments.PATH} (such as `/var/lib/gitea/data/data/attachments`) Fix go-gitea#26864 Follow go-gitea#26271
1 parent 2cfabb6 commit 40bb0bf

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

custom/conf/app.example.ini

+3-2
Original file line numberDiff line numberDiff line change
@@ -1804,8 +1804,9 @@ LEVEL = Info
18041804
;; Currently, only `minio` is supported.
18051805
;SERVE_DIRECT = false
18061806
;;
1807-
;; Path for attachments. Defaults to `data/attachments` only available when STORAGE_TYPE is `local`
1808-
;PATH = data/attachments
1807+
;; Path for attachments. Defaults to `attachments`. Only available when STORAGE_TYPE is `local`
1808+
;; Relative paths will be resolved to `${AppDataPath}/${attachment.PATH}`
1809+
;PATH = attachments
18091810
;;
18101811
;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
18111812
;MINIO_ENDPOINT = localhost:9000

docs/content/administration/config-cheat-sheet.en-us.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ Default templates for project boards:
818818
- `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once.
819819
- `STORAGE_TYPE`: **local**: Storage type for attachments, `local` for local disk or `minio` for s3 compatible object storage service, default is `local` or other name defined with `[storage.xxx]`
820820
- `SERVE_DIRECT`: **false**: Allows the storage driver to redirect to authenticated URLs to serve files directly. Currently, only Minio/S3 is supported via signed URLs, local does nothing.
821-
- `PATH`: **data/attachments**: Path to store attachments only available when STORAGE_TYPE is `local`
821+
- `PATH`: **attachments**: Path to store attachments only available when STORAGE_TYPE is `local`, relative paths will be resolved to `${AppDataPath}/${attachment.PATH}`.
822822
- `MINIO_ENDPOINT`: **localhost:9000**: Minio endpoint to connect only available when STORAGE_TYPE is `minio`
823823
- `MINIO_ACCESS_KEY_ID`: Minio accessKeyID to connect only available when STORAGE_TYPE is `minio`
824824
- `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio`

docs/content/administration/config-cheat-sheet.zh-cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ menu:
230230
- `MAX_SIZE`: 附件最大限制,单位 MB,比如: `4`
231231
- `MAX_FILES`: 一次最多上传的附件数量,比如: `5`
232232
- `STORAGE_TYPE`: **local**: 附件存储类型,`local` 将存储到本地文件夹, `minio` 将存储到 s3 兼容的对象存储服务中。
233-
- `PATH`: **data/attachments**: 附件存储路径,仅当 `STORAGE_TYPE``local` 时有效。
233+
- `PATH`: **attachments**: 存储附件的路径,仅当 STORAGE_TYPE 为 `local` 时可用。如果是相对路径,将会被解析为 `${AppDataPath}/${attachment.PATH}`.
234234
- `MINIO_ENDPOINT`: **localhost:9000**: Minio 终端,仅当 `STORAGE_TYPE``minio` 时有效。
235235
- `MINIO_ACCESS_KEY_ID`: Minio accessKeyID ,仅当 `STORAGE_TYPE``minio` 时有效。
236236
- `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey,仅当 `STORAGE_TYPE``minio` 时有效。

0 commit comments

Comments
 (0)