From f38e8a1a4b4c4c71185dd84f8c16d3aef8b610b2 Mon Sep 17 00:00:00 2001 From: caicandong <1290147055@qq.com> Date: Sun, 3 Sep 2023 17:14:45 +0800 Subject: [PATCH 1/3] Update docs about attachment path --- custom/conf/app.example.ini | 5 +++-- docs/content/administration/config-cheat-sheet.en-us.md | 2 +- docs/content/administration/config-cheat-sheet.zh-cn.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 96a0a3ede93d7..e93a0b42f978e 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -1824,8 +1824,9 @@ LEVEL = Info ;; Currently, only `minio` is supported. ;SERVE_DIRECT = false ;; -;; Path for attachments. Defaults to `data/attachments` only available when STORAGE_TYPE is `local` -;PATH = data/attachments +;; Path for attachments. Defaults to `attachments` only available when STORAGE_TYPE is `local` +;; Relative paths will be resolved to `${AppDataPath}/${attachment.PATH}` +;PATH = attachments ;; ;; Minio endpoint to connect only available when STORAGE_TYPE is `minio` ;MINIO_ENDPOINT = localhost:9000 diff --git a/docs/content/administration/config-cheat-sheet.en-us.md b/docs/content/administration/config-cheat-sheet.en-us.md index 311a2b2b75880..177f86b1c14d1 100644 --- a/docs/content/administration/config-cheat-sheet.en-us.md +++ b/docs/content/administration/config-cheat-sheet.en-us.md @@ -822,7 +822,7 @@ Default templates for project boards: - `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once. - `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]` - `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. -- `PATH`: **data/attachments**: Path to store attachments only available when STORAGE_TYPE is `local` +- `PATH`: **`attachments`**: Path to store attachments only available when STORAGE_TYPE is `local`,relative paths will be resolved to `${AppDataPath}/${attachment.PATH}`. - `MINIO_ENDPOINT`: **localhost:9000**: Minio endpoint to connect only available when STORAGE_TYPE is `minio` - `MINIO_ACCESS_KEY_ID`: Minio accessKeyID to connect only available when STORAGE_TYPE is `minio` - `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio` diff --git a/docs/content/administration/config-cheat-sheet.zh-cn.md b/docs/content/administration/config-cheat-sheet.zh-cn.md index 39121908c21a2..328c269aac80d 100644 --- a/docs/content/administration/config-cheat-sheet.zh-cn.md +++ b/docs/content/administration/config-cheat-sheet.zh-cn.md @@ -788,7 +788,7 @@ Gitea 创建以下非唯一队列: - `MAX_FILES`: **5**: 一次最多上传的附件数量。 - `STORAGE_TYPE`: **local**: 附件的存储类型,`local` 表示本地磁盘,`minio` 表示兼容 S3 的对象存储服务,如果未设置将使用默认值 `local` 或其他在 `[storage.xxx]` 中定义的名称。 - `SERVE_DIRECT`: **false**: 允许存储驱动器重定向到经过身份验证的 URL 以直接提供文件。目前,只支持 Minio/S3 通过签名 URL 提供支持,local 不会执行任何操作。 -- `PATH`: **data/attachments**: 存储附件的路径,仅当 STORAGE_TYPE 为 `local` 时可用。 +- `PATH`: **attachments**: 存储附件的路径,仅当 STORAGE_TYPE 为 `local` 时可用。如果是相对路径,将会被解析为 `${AppDataPath}/${attachment.PATH}`. - `MINIO_ENDPOINT`: **localhost:9000**: Minio 端点以连接,仅当 STORAGE_TYPE 为 `minio` 时可用。 - `MINIO_ACCESS_KEY_ID`: Minio accessKeyID 以连接,仅当 STORAGE_TYPE 为 `minio` 时可用。 - `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey 以连接,仅当 STORAGE_TYPE 为 `minio` 时可用。 From 610e70a78e6428c95c46e5096509036aa564e654 Mon Sep 17 00:00:00 2001 From: caicandong <1290147055@qq.com> Date: Sun, 3 Sep 2023 17:20:16 +0800 Subject: [PATCH 2/3] format --- docs/content/administration/config-cheat-sheet.en-us.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/content/administration/config-cheat-sheet.en-us.md b/docs/content/administration/config-cheat-sheet.en-us.md index 177f86b1c14d1..4158f14cb1ddd 100644 --- a/docs/content/administration/config-cheat-sheet.en-us.md +++ b/docs/content/administration/config-cheat-sheet.en-us.md @@ -822,7 +822,7 @@ Default templates for project boards: - `MAX_FILES`: **5**: Maximum number of attachments that can be uploaded at once. - `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]` - `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. -- `PATH`: **`attachments`**: Path to store attachments only available when STORAGE_TYPE is `local`,relative paths will be resolved to `${AppDataPath}/${attachment.PATH}`. +- `PATH`: **attachments**: Path to store attachments only available when STORAGE_TYPE is `local`, relative paths will be resolved to `${AppDataPath}/${attachment.PATH}`. - `MINIO_ENDPOINT`: **localhost:9000**: Minio endpoint to connect only available when STORAGE_TYPE is `minio` - `MINIO_ACCESS_KEY_ID`: Minio accessKeyID to connect only available when STORAGE_TYPE is `minio` - `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio` From 7a40fbff10312292f2b7218642d8dfc4caaa67a8 Mon Sep 17 00:00:00 2001 From: CaiCandong <50507092+CaiCandong@users.noreply.github.com> Date: Sun, 3 Sep 2023 17:25:34 +0800 Subject: [PATCH 3/3] Update custom/conf/app.example.ini Co-authored-by: delvh --- custom/conf/app.example.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index e93a0b42f978e..dd673190aa745 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -1824,7 +1824,7 @@ LEVEL = Info ;; Currently, only `minio` is supported. ;SERVE_DIRECT = false ;; -;; Path for attachments. Defaults to `attachments` only available when STORAGE_TYPE is `local` +;; Path for attachments. Defaults to `attachments`. Only available when STORAGE_TYPE is `local` ;; Relative paths will be resolved to `${AppDataPath}/${attachment.PATH}` ;PATH = attachments ;;