Skip to content

Commit 7a9710a

Browse files
committed
Move settings whether to generate thumbnails for S3 images to storage related settings
1 parent 2b6ad1d commit 7a9710a

17 files changed

+181
-118
lines changed

proto/api/v1/attachment_service.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ message Attachment {
8484
// Optional. The related memo. Refer to `Memo.name`.
8585
// Format: memos/{memo}
8686
optional string memo = 8 [(google.api.field_behavior) = OPTIONAL];
87+
88+
// Optional. Output only. Whether to use thumbnails for this attachment when stored in S3.
89+
optional bool use_thumbnail_for_s3_image = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
8790
}
8891

8992
message CreateAttachmentRequest {

proto/api/v1/workspace_service.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ message WorkspaceSetting {
147147
}
148148
// The S3 config.
149149
S3Config s3_config = 4;
150+
// use_thumbnails_for_s3_images enables thumbnail generation for images stored in S3.
151+
// When false, images stored in S3 will not have thumbnails generated.
152+
bool use_thumbnails_for_s3_images = 5;
150153
}
151154

152155
// Memo-related workspace settings and policies.
@@ -169,9 +172,6 @@ message WorkspaceSetting {
169172
bool enable_blur_nsfw_content = 9;
170173
// nsfw_tags is the list of tags that mark content as NSFW for blurring.
171174
repeated string nsfw_tags = 10;
172-
// use_thumbnails_for_s3_images enables thumbnail generation for images stored in S3.
173-
// When false, images stored in S3 will not have thumbnails generated.
174-
bool use_thumbnails_for_s3_images = 11;
175175
}
176176
}
177177

proto/gen/api/v1/attachment_service.pb.go

Lines changed: 18 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/gen/api/v1/workspace_service.pb.go

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/gen/openapi.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,6 +2203,10 @@ components:
22032203
memo:
22042204
type: string
22052205
description: "Optional. The related memo. Refer to `Memo.name`.\r\n Format: memos/{memo}"
2206+
useThumbnailForS3Image:
2207+
readOnly: true
2208+
type: boolean
2209+
description: "Optional. Output only. Whether to use thumbnails for this attachment when stored in S3.\r\n This is determined by the workspace setting at the time of attachment creation."
22062210
AutoLinkNode:
22072211
type: object
22082212
properties:
@@ -3652,9 +3656,6 @@ components:
36523656
items:
36533657
type: string
36543658
description: nsfw_tags is the list of tags that mark content as NSFW for blurring.
3655-
useThumbnailsForS3Images:
3656-
type: boolean
3657-
description: "use_thumbnails_for_s3_images enables thumbnail generation for images stored in S3.\r\n When false, images stored in S3 will not have thumbnails generated."
36583659
description: Memo-related workspace settings and policies.
36593660
WorkspaceSetting_StorageSetting:
36603661
type: object
@@ -3678,6 +3679,9 @@ components:
36783679
allOf:
36793680
- $ref: '#/components/schemas/StorageSetting_S3Config'
36803681
description: The S3 config.
3682+
useThumbnailsForS3Images:
3683+
type: boolean
3684+
description: "use_thumbnails_for_s3_images enables thumbnail generation for images stored in S3.\r\n When false, images stored in S3 will not have thumbnails generated."
36813685
description: Storage configuration settings for workspace attachments.
36823686
tags:
36833687
- name: ActivityService

proto/gen/store/workspace_setting.pb.go

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/store/workspace_setting.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ message WorkspaceStorageSetting {
8383
int64 upload_size_limit_mb = 3;
8484
// The S3 config.
8585
StorageS3Config s3_config = 4;
86+
// use_thumbnails_for_s3_images enables thumbnail generation for images stored in S3.
87+
// When false, images stored in S3 will not have thumbnails generated.
88+
bool use_thumbnails_for_s3_images = 5;
8689
}
8790

8891
// Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
@@ -114,7 +117,4 @@ message WorkspaceMemoRelatedSetting {
114117
bool enable_blur_nsfw_content = 9;
115118
// nsfw_tags is the list of tags that mark content as NSFW for blurring.
116119
repeated string nsfw_tags = 10;
117-
// use_thumbnails_for_s3_images enables thumbnail generation for images stored in S3.
118-
// When false, images stored in S3 will not have thumbnails generated.
119-
bool use_thumbnails_for_s3_images = 11;
120120
}

0 commit comments

Comments
 (0)