Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

refactor: move the upload size limit to usage limits

boojack7cb288864bbc
diff --git a/core/usagelimit/usagelimit.go b/core/usagelimit/usagelimit.go
index a10dcb54f..0d21b8d2c 100644
--- a/core/usagelimit/usagelimit.go
+++ b/core/usagelimit/usagelimit.go
@@ -144,19 +144,34 @@ func CheckMemoCreate(ctx context.Context, s Store, userID int32) error {
return nil
}
-// CheckUpload returns a *Refusal when storing a file of size bytes would break
-// the per-file limit or the storage limit of userID. instanceUploadLimit is
-// the instance-wide upload limit in bytes, which the caller checks first: a
-// per-file usage limit only applies when it is stricter than that limit. With
-// no storage limit in effect it runs no sum query.
-func CheckUpload(ctx context.Context, s Store, userID int32, size, instanceUploadLimit int64) error {
+// CheckFileSize returns a *Refusal when a file of size bytes is larger than
+// the per-file limit of userID. It runs no count or sum query.
+func CheckFileSize(ctx context.Context, s Store, userID int32, size int64) error {
effective, err := EffectiveFor(ctx, s, userID)
if err != nil {
return err
}
- if upload := effective.UploadBytes; upload.Limited() && upload.Value < instanceUploadLimit && size > upload.Value {
+ return effective.checkFileSize(size)
+}
+
+func (e Effective) checkFileSize(size int64) error {
+ if upload := e.UploadBytes; upload.Limited() && size > upload.Value {
return &Refusal{Metric: MetricUploadBytes, Limit: upload.Value, Usage: size, Source: upload.Source}
}
+ return nil
+}
+
+// CheckUpload returns a *Refusal when storing a file of size bytes would break
+// the per-file limit or the storage limit of userID. With no storage limit in
+// effect it runs no sum query.
+func CheckUpload(ctx context.Context, s Store, userID int32, size int64) error {
+ effective, err := EffectiveFor(ctx, s, userID)
+ if err != nil {
+ return err
+ }
+ if err := effective.checkFileSize(size); err != nil {
+ return err
+ }
if !effective.StorageBytes.Limited() {
return nil
}
diff --git a/core/usagelimit/usagelimit_test.go b/core/usagelimit/usagelimit_test.go
index cd2f977ab..5473a3fbb 100644
--- a/core/usagelimit/usagelimit_test.go
+++ b/core/usagelimit/usagelimit_test.go
@@ -90,24 +90,33 @@ func TestCheckMemoCreate(t *testing.T) {
func TestCheckUpload(t *testing.T) {
ctx := context.Background()
- const instanceLimit = 30 << 20
unlimited := &fakeStore{storage: 1 << 40}
- require.NoError(t, CheckUpload(ctx, unlimited, 1, 1<<20, instanceLimit))
+ require.NoError(t, CheckUpload(ctx, unlimited, 1, 1<<40), "no limits means any file size")
require.Zero(t, unlimited.sumCalls, "no sum query runs without a storage limit")
s := &fakeStore{storage: 900, setting: &storepb.InstanceUsageLimitsSetting{Limits: []*storepb.InstanceUsageLimitsSetting_UsageLimit{
limit("default-storage", MetricStorageBytes, 0, 1000),
limit("default-upload", MetricUploadBytes, 0, 200),
+ limit("alice-upload", MetricUploadBytes, 2, 500),
}}}
- require.NoError(t, CheckUpload(ctx, s, 1, 100, instanceLimit), "exactly at the storage limit is allowed")
- require.Equal(t, &Refusal{Metric: MetricStorageBytes, Limit: 1000, Usage: 900, Source: "default-storage"}, AsRefusal(CheckUpload(ctx, s, 1, 101, instanceLimit)))
- require.Equal(t, &Refusal{Metric: MetricUploadBytes, Limit: 200, Usage: 201, Source: "default-upload"}, AsRefusal(CheckUpload(ctx, s, 1, 201, instanceLimit)))
+ require.NoError(t, CheckUpload(ctx, s, 1, 100), "exactly at the storage limit is allowed")
+ require.Equal(t, &Refusal{Metric: MetricStorageBytes, Limit: 1000, Usage: 900, Source: "default-storage"}, AsRefusal(CheckUpload(ctx, s, 1, 101)))
+ require.Equal(t, &Refusal{Metric: MetricUploadBytes, Limit: 200, Usage: 201, Source: "default-upload"}, AsRefusal(CheckUpload(ctx, s, 1, 201)))
- // A per-file limit at or above the instance limit has no effect; the
- // instance limit, checked by the caller, applies instead.
- s.setting.Limits[1].Value = instanceLimit
+ // A user's own per-file limit replaces the default, even when it is higher.
s.storage = 0
- s.setting.Limits[0].Value = 0
- require.NoError(t, CheckUpload(ctx, s, 1, instanceLimit, instanceLimit))
+ require.NoError(t, CheckUpload(ctx, s, 2, 500))
+ require.Equal(t, &Refusal{Metric: MetricUploadBytes, Limit: 500, Usage: 501, Source: "alice-upload"}, AsRefusal(CheckUpload(ctx, s, 2, 501)))
+}
+
+func TestCheckFileSize(t *testing.T) {
+ ctx := context.Background()
+ s := &fakeStore{storage: 1 << 40, setting: &storepb.InstanceUsageLimitsSetting{Limits: []*storepb.InstanceUsageLimitsSetting_UsageLimit{
+ limit("default-storage", MetricStorageBytes, 0, 1),
+ limit("default-upload", MetricUploadBytes, 0, 200),
+ }}}
+ require.NoError(t, CheckFileSize(ctx, s, 1, 200), "the storage limit is not checked")
+ require.Equal(t, &Refusal{Metric: MetricUploadBytes, Limit: 200, Usage: 201, Source: "default-upload"}, AsRefusal(CheckFileSize(ctx, s, 1, 201)))
+ require.Zero(t, s.sumCalls, "no sum query runs for a per-file check")
}
diff --git a/proto/api/instance_service.proto b/proto/api/instance_service.proto
index 95ee655ca..8fd5395c1 100644
--- a/proto/api/instance_service.proto
+++ b/proto/api/instance_service.proto
@@ -279,14 +279,11 @@ message InstanceSetting {
// Default is assets/{timestamp}_{uuid}_{filename}.
string filepath_template = 3;
- // The maximum upload size in megabytes. Default is 32.
- int64 upload_size_limit_mb = 4;
-
// Legacy compatibility field. New clients use default_storage_id.
- StorageType storage_type = 5;
+ StorageType storage_type = 4;
// Legacy compatibility field. New clients use storages.
- S3Config s3_config = 6;
+ S3Config s3_config = 5;
// StorageType is the legacy storage type, retained for compatibility with existing clients.
enum StorageType {
@@ -600,8 +597,7 @@ message UsageLimit {
(google.api.resource_reference) = {type: "memos.api/User"}
];
- // Required. The limit. Must not be negative. 0 means unlimited for MEMOS and
- // STORAGE_BYTES, and no extra limit for UPLOAD_BYTES.
+ // Required. The limit. Must not be negative. 0 means unlimited.
int64 value = 4 [(google.api.field_behavior) = REQUIRED];
// Output only. The creation time.
@@ -619,8 +615,7 @@ message UsageLimit {
// The total size in bytes of the user's uploads, including uploads not
// attached to a memo. External links do not count.
STORAGE_BYTES = 2;
- // The size in bytes of one uploaded file. It can only lower the instance
- // upload limit, never raise it.
+ // The size in bytes of one uploaded file.
UPLOAD_BYTES = 3;
}
}
diff --git a/proto/api/user_service.proto b/proto/api/user_service.proto
index fa0406ae9..9650b14bb 100644
--- a/proto/api/user_service.proto
+++ b/proto/api/user_service.proto
@@ -711,14 +711,13 @@ message UserUsage {
// The limit on storage_bytes.
EffectiveLimit storage_bytes_limit = 5;
- // The limit on the size of one uploaded file. It applies only when it is
- // lower than the instance upload limit.
+ // The limit on the size of one uploaded file.
EffectiveLimit upload_bytes_limit = 6;
// EffectiveLimit is the limit in effect for one metric, and where it comes
// from.
message EffectiveLimit {
- // The limit. 0 means unlimited, or no extra limit for upload_bytes_limit.
+ // The limit. 0 means unlimited.
int64 value = 1;
// The usage limit the value comes from: the user's own limit, or else the
diff --git a/proto/gen/api/instance_service.pb.go b/proto/gen/api/instance_service.pb.go
index 13cbae97f..8eda4fae8 100644
--- a/proto/gen/api/instance_service.pb.go
+++ b/proto/gen/api/instance_service.pb.go
@@ -326,8 +326,7 @@ const (
// The total size in bytes of the user's uploads, including uploads not
// attached to a memo. External links do not count.
UsageLimit_STORAGE_BYTES UsageLimit_Metric = 2
- // The size in bytes of one uploaded file. It can only lower the instance
- // upload limit, never raise it.
+ // The size in bytes of one uploaded file.
UsageLimit_UPLOAD_BYTES UsageLimit_Metric = 3
)
@@ -1071,8 +1070,7 @@ type UsageLimit struct {
// Optional. Immutable. The user the limit applies to. Empty means every user.
// Format: users/{user}
User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
- // Required. The limit. Must not be negative. 0 means unlimited for MEMOS and
- // STORAGE_BYTES, and no extra limit for UPLOAD_BYTES.
+ // Required. The limit. Must not be negative. 0 means unlimited.
Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"`
// Output only. The creation time.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
@@ -1661,12 +1659,10 @@ type InstanceSetting_StorageSetting struct {
// The template of attachment file paths.
// Default is assets/{timestamp}_{uuid}_{filename}.
FilepathTemplate string `protobuf:"bytes,3,opt,name=filepath_template,json=filepathTemplate,proto3" json:"filepath_template,omitempty"`
- // The maximum upload size in megabytes. Default is 32.
- UploadSizeLimitMb int64 `protobuf:"varint,4,opt,name=upload_size_limit_mb,json=uploadSizeLimitMb,proto3" json:"upload_size_limit_mb,omitempty"`
// Legacy compatibility field. New clients use default_storage_id.
- StorageType InstanceSetting_StorageSetting_StorageType `protobuf:"varint,5,opt,name=storage_type,json=storageType,proto3,enum=memos.api.InstanceSetting_StorageSetting_StorageType" json:"storage_type,omitempty"`
+ StorageType InstanceSetting_StorageSetting_StorageType `protobuf:"varint,4,opt,name=storage_type,json=storageType,proto3,enum=memos.api.InstanceSetting_StorageSetting_StorageType" json:"storage_type,omitempty"`
// Legacy compatibility field. New clients use storages.
- S3Config *InstanceSetting_StorageSetting_S3Config `protobuf:"bytes,6,opt,name=s3_config,json=s3Config,proto3" json:"s3_config,omitempty"`
+ S3Config *InstanceSetting_StorageSetting_S3Config `protobuf:"bytes,5,opt,name=s3_config,json=s3Config,proto3" json:"s3_config,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -1722,13 +1718,6 @@ func (x *InstanceSetting_StorageSetting) GetFilepathTemplate() string {
return ""
}
-func (x *InstanceSetting_StorageSetting) GetUploadSizeLimitMb() int64 {
- if x != nil {
- return x.UploadSizeLimitMb
- }
- return 0
-}
-
func (x *InstanceSetting_StorageSetting) GetStorageType() InstanceSetting_StorageSetting_StorageType {
if x != nil {
return x.StorageType
@@ -2806,7 +2795,7 @@ const file_api_instance_service_proto_rawDesc = "" +
"\tChallenge\x12\x1a\n" +
"\bprovider\x18\x01 \x01(\tR\bprovider\x12\x19\n" +
"\bsite_key\x18\x02 \x01(\tR\asiteKey\"\x1b\n" +
- "\x19GetInstanceProfileRequest\"\xf1!\n" +
+ "\x19GetInstanceProfileRequest\"\xc0!\n" +
"\x0fInstanceSetting\x12\x17\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12T\n" +
"\x0fgeneral_setting\x18\x02 \x01(\v2).memos.api.InstanceSetting.GeneralSettingH\x00R\x0egeneralSetting\x12T\n" +
@@ -2829,14 +2818,13 @@ const file_api_instance_service_proto_rawDesc = "" +
"\rCustomProfile\x12\x14\n" +
"\x05title\x18\x01 \x01(\tR\x05title\x12 \n" +
"\vdescription\x18\x02 \x01(\tR\vdescription\x12\x19\n" +
- "\blogo_url\x18\x03 \x01(\tR\alogoUrl\x1a\xe2\x05\n" +
+ "\blogo_url\x18\x03 \x01(\tR\alogoUrl\x1a\xb1\x05\n" +
"\x0eStorageSetting\x12>\n" +
"\bstorages\x18\x01 \x03(\v2\".memos.api.InstanceSetting.StorageR\bstorages\x12,\n" +
"\x12default_storage_id\x18\x02 \x01(\tR\x10defaultStorageId\x12+\n" +
- "\x11filepath_template\x18\x03 \x01(\tR\x10filepathTemplate\x12/\n" +
- "\x14upload_size_limit_mb\x18\x04 \x01(\x03R\x11uploadSizeLimitMb\x12X\n" +
- "\fstorage_type\x18\x05 \x01(\x0e25.memos.api.InstanceSetting.StorageSetting.StorageTypeR\vstorageType\x12O\n" +
- "\ts3_config\x18\x06 \x01(\v22.memos.api.InstanceSetting.StorageSetting.S3ConfigR\bs3Config\x1a\x8a\x02\n" +
+ "\x11filepath_template\x18\x03 \x01(\tR\x10filepathTemplate\x12X\n" +
+ "\fstorage_type\x18\x04 \x01(\x0e25.memos.api.InstanceSetting.StorageSetting.StorageTypeR\vstorageType\x12O\n" +
+ "\ts3_config\x18\x05 \x01(\v22.memos.api.InstanceSetting.StorageSetting.S3ConfigR\bs3Config\x1a\x8a\x02\n" +
"\bS3Config\x12\x1a\n" +
"\bendpoint\x18\x01 \x01(\tR\bendpoint\x12\x16\n" +
"\x06region\x18\x02 \x01(\tR\x06region\x12\x16\n" +
diff --git a/proto/gen/api/user_service.pb.go b/proto/gen/api/user_service.pb.go
index 700fd5df6..660dad41d 100644
--- a/proto/gen/api/user_service.pb.go
+++ b/proto/gen/api/user_service.pb.go
@@ -1619,8 +1619,7 @@ type UserUsage struct {
MemosLimit *UserUsage_EffectiveLimit `protobuf:"bytes,4,opt,name=memos_limit,json=memosLimit,proto3" json:"memos_limit,omitempty"`
// The limit on storage_bytes.
StorageBytesLimit *UserUsage_EffectiveLimit `protobuf:"bytes,5,opt,name=storage_bytes_limit,json=storageBytesLimit,proto3" json:"storage_bytes_limit,omitempty"`
- // The limit on the size of one uploaded file. It applies only when it is
- // lower than the instance upload limit.
+ // The limit on the size of one uploaded file.
UploadBytesLimit *UserUsage_EffectiveLimit `protobuf:"bytes,6,opt,name=upload_bytes_limit,json=uploadBytesLimit,proto3" json:"upload_bytes_limit,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
@@ -4611,7 +4610,7 @@ func (x *UserStats_MemoTypeStats) GetUndoCount() int32 {
// from.
type UserUsage_EffectiveLimit struct {
state protoimpl.MessageState `protogen:"open.v1"`
- // The limit. 0 means unlimited, or no extra limit for upload_bytes_limit.
+ // The limit. 0 means unlimited.
Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
// The usage limit the value comes from: the user's own limit, or else the
// default. Empty when no usage limit applies.
diff --git a/proto/gen/openapi.yaml b/proto/gen/openapi.yaml
index 41eedf540..1ad845a0a 100644
--- a/proto/gen/openapi.yaml
+++ b/proto/gen/openapi.yaml
@@ -4251,9 +4251,6 @@ components:
description: |-
The template of attachment file paths.
Default is assets/{timestamp}_{uuid}_{filename}.
- uploadSizeLimitMb:
- type: string
- description: The maximum upload size in megabytes. Default is 32.
storageType:
enum:
- STORAGE_TYPE_UNSPECIFIED
@@ -5575,9 +5572,7 @@ components:
Format: users/{user}
value:
type: string
- description: |-
- Required. The limit. Must not be negative. 0 means unlimited for MEMOS and
- STORAGE_BYTES, and no extra limit for UPLOAD_BYTES.
+ description: Required. The limit. Must not be negative. 0 means unlimited.
createTime:
readOnly: true
type: string
@@ -5964,16 +5959,14 @@ components:
uploadBytesLimit:
allOf:
- $ref: '#/components/schemas/UserUsage_EffectiveLimit'
- description: |-
- The limit on the size of one uploaded file. It applies only when it is
- lower than the instance upload limit.
+ description: The limit on the size of one uploaded file.
description: UserUsage is a user's usage and the usage limits in effect for the user.
UserUsage_EffectiveLimit:
type: object
properties:
value:
type: string
- description: The limit. 0 means unlimited, or no extra limit for upload_bytes_limit.
+ description: The limit. 0 means unlimited.
usageLimit:
type: string
description: |-
diff --git a/proto/gen/store/instance_setting.pb.go b/proto/gen/store/instance_setting.pb.go
index ba8ccc26d..e781b336d 100644
--- a/proto/gen/store/instance_setting.pb.go
+++ b/proto/gen/store/instance_setting.pb.go
@@ -321,8 +321,7 @@ const (
// STORAGE_BYTES limits the total size of a user's uploads. External links
// do not count.
InstanceUsageLimitsSetting_STORAGE_BYTES InstanceUsageLimitsSetting_Metric = 2
- // UPLOAD_BYTES limits the size of one uploaded file. It can only lower the
- // instance upload limit.
+ // UPLOAD_BYTES limits the size of one uploaded file.
InstanceUsageLimitsSetting_UPLOAD_BYTES InstanceUsageLimitsSetting_Metric = 3
)
@@ -895,15 +894,13 @@ type InstanceStorageSetting struct {
// The template of file path.
// e.g. assets/{timestamp}_{filename}
FilepathTemplate string `protobuf:"bytes,2,opt,name=filepath_template,json=filepathTemplate,proto3" json:"filepath_template,omitempty"`
- // The max upload size in megabytes.
- UploadSizeLimitMb int64 `protobuf:"varint,3,opt,name=upload_size_limit_mb,json=uploadSizeLimitMb,proto3" json:"upload_size_limit_mb,omitempty"`
// Legacy compatibility field. New code uses storages.
- S3Config *StorageS3Config `protobuf:"bytes,4,opt,name=s3_config,json=s3Config,proto3" json:"s3_config,omitempty"`
+ S3Config *StorageS3Config `protobuf:"bytes,3,opt,name=s3_config,json=s3Config,proto3" json:"s3_config,omitempty"`
// storages contains configured storage instances, including inactive instances
// that may still be referenced by existing attachments.
- Storages []*Storage `protobuf:"bytes,5,rep,name=storages,proto3" json:"storages,omitempty"`
+ Storages []*Storage `protobuf:"bytes,4,rep,name=storages,proto3" json:"storages,omitempty"`
// default_storage_id identifies the storage used for new attachments.
- DefaultStorageId string `protobuf:"bytes,6,opt,name=default_storage_id,json=defaultStorageId,proto3" json:"default_storage_id,omitempty"`
+ DefaultStorageId string `protobuf:"bytes,5,opt,name=default_storage_id,json=defaultStorageId,proto3" json:"default_storage_id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -952,13 +949,6 @@ func (x *InstanceStorageSetting) GetFilepathTemplate() string {
return ""
}
-func (x *InstanceStorageSetting) GetUploadSizeLimitMb() int64 {
- if x != nil {
- return x.UploadSizeLimitMb
- }
- return 0
-}
-
func (x *InstanceStorageSetting) GetS3Config() *StorageS3Config {
if x != nil {
return x.S3Config
@@ -1843,14 +1833,13 @@ const file_store_instance_setting_proto_rawDesc = "" +
"\x04type\x18\x03 \x01(\x0e2\x18.memos.store.StorageTypeR\x04type\x12;\n" +
"\ts3_config\x18\n" +
" \x01(\v2\x1c.memos.store.StorageS3ConfigH\x00R\bs3ConfigB\b\n" +
- "\x06config\"\xb3\x03\n" +
+ "\x06config\"\x82\x03\n" +
"\x16InstanceStorageSetting\x12R\n" +
"\fstorage_type\x18\x01 \x01(\x0e2/.memos.store.InstanceStorageSetting.StorageTypeR\vstorageType\x12+\n" +
- "\x11filepath_template\x18\x02 \x01(\tR\x10filepathTemplate\x12/\n" +
- "\x14upload_size_limit_mb\x18\x03 \x01(\x03R\x11uploadSizeLimitMb\x129\n" +
- "\ts3_config\x18\x04 \x01(\v2\x1c.memos.store.StorageS3ConfigR\bs3Config\x120\n" +
- "\bstorages\x18\x05 \x03(\v2\x14.memos.store.StorageR\bstorages\x12,\n" +
- "\x12default_storage_id\x18\x06 \x01(\tR\x10defaultStorageId\"L\n" +
+ "\x11filepath_template\x18\x02 \x01(\tR\x10filepathTemplate\x129\n" +
+ "\ts3_config\x18\x03 \x01(\v2\x1c.memos.store.StorageS3ConfigR\bs3Config\x120\n" +
+ "\bstorages\x18\x04 \x03(\v2\x14.memos.store.StorageR\bstorages\x12,\n" +
+ "\x12default_storage_id\x18\x05 \x01(\tR\x10defaultStorageId\"L\n" +
"\vStorageType\x12\x1c\n" +
"\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\f\n" +
"\bDATABASE\x10\x01\x12\t\n" +
diff --git a/proto/store/instance_setting.proto b/proto/store/instance_setting.proto
index 0b13a4306..f405160b9 100644
--- a/proto/store/instance_setting.proto
+++ b/proto/store/instance_setting.proto
@@ -118,15 +118,13 @@ message InstanceStorageSetting {
// The template of file path.
// e.g. assets/{timestamp}_{filename}
string filepath_template = 2;
- // The max upload size in megabytes.
- int64 upload_size_limit_mb = 3;
// Legacy compatibility field. New code uses storages.
- StorageS3Config s3_config = 4;
+ StorageS3Config s3_config = 3;
// storages contains configured storage instances, including inactive instances
// that may still be referenced by existing attachments.
- repeated Storage storages = 5;
+ repeated Storage storages = 4;
// default_storage_id identifies the storage used for new attachments.
- string default_storage_id = 6;
+ string default_storage_id = 5;
}
// Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
@@ -276,8 +274,7 @@ message InstanceUsageLimitsSetting {
// STORAGE_BYTES limits the total size of a user's uploads. External links
// do not count.
STORAGE_BYTES = 2;
- // UPLOAD_BYTES limits the size of one uploaded file. It can only lower the
- // instance upload limit.
+ // UPLOAD_BYTES limits the size of one uploaded file.
UPLOAD_BYTES = 3;
}
}
diff --git a/server/api/api.go b/server/api/api.go
index 7a67b8905..b46e9de6e 100644
--- a/server/api/api.go
+++ b/server/api/api.go
@@ -38,7 +38,7 @@ const maxGeneralRequestBytes = 16 << 20
// inlineContentProcedures carry a whole file in one request body and keep
// the large cap; the size of that content is checked again by the handler
-// against the instance upload limit.
+// against the user's upload limits.
var inlineContentProcedures = map[string]struct{}{
"/memos.api.AttachmentService/CreateAttachment": {},
"/memos.api.AIService/Transcribe": {},
diff --git a/server/api/attachment_service.go b/server/api/attachment_service.go
index 70fc9c26c..a373c4dcf 100644
--- a/server/api/attachment_service.go
+++ b/server/api/attachment_service.go
@@ -5,7 +5,6 @@ import (
"context"
"io"
"log/slog"
- "math"
"mime"
"net/http"
"path/filepath"
@@ -25,9 +24,7 @@ import (
)
const (
- // DefaultUploadSizeLimitBytes applies when no upload size limit is configured.
- DefaultUploadSizeLimitBytes = 32 << 20
- MebiByte = 1024 * 1024
+ MebiByte = 1024 * 1024
// defaultJPEGQuality is the JPEG quality used when re-encoding images for EXIF stripping.
// Quality 95 maintains visual quality while ensuring metadata is removed.
@@ -176,30 +173,13 @@ func (s *APIService) CreateAttachment(ctx context.Context, request *apipb.Create
return nil, status.Errorf(codes.Internal, "failed to get instance storage setting: %v", err)
}
content := request.Attachment.Content
- if err := checkUploadSize(instanceStorageSetting, int64(len(content))); err != nil {
- return nil, err
- }
- if err := s.checkUploadQuota(ctx, create.CreatorID, int64(len(content)), instanceStorageSetting); err != nil {
+ if err := s.checkUploadQuota(ctx, create.CreatorID, int64(len(content))); err != nil {
return nil, err
}
create.Size = int64(len(content))
return s.processAndSaveAttachment(ctx, create, instanceStorageSetting, bytes.NewReader(content))
}
-func attachmentUploadLimit(setting *storepb.InstanceStorageSetting) int64 {
- if setting.UploadSizeLimitMb <= 0 {
- return DefaultUploadSizeLimitBytes
- }
- return min(setting.UploadSizeLimitMb, math.MaxInt64/MebiByte) * MebiByte
-}
-
-func checkUploadSize(setting *storepb.InstanceStorageSetting, size int64) error {
- if limit := attachmentUploadLimit(setting); size > limit {
- return newFileTooLargeError(limit, size)
- }
- return nil
-}
-
// attachmentSource is the file content handed to the processing pipeline: a
// bytes.Reader for the one-shot RPC, an *os.File for a chunked upload.
type attachmentSource interface {
diff --git a/server/api/attachment_upload.go b/server/api/attachment_upload.go
index 0e19b10b2..c71ef875b 100644
--- a/server/api/attachment_upload.go
+++ b/server/api/attachment_upload.go
@@ -121,14 +121,7 @@ func (s *APIService) startAttachmentUpload(ctx context.Context, request *apipb.U
if int64(len(request.Data)) > spec.TotalSize {
return "", nil, status.Errorf(codes.InvalidArgument, "data exceeds total_size")
}
- setting, err := s.Store.GetInstanceStorageSetting(ctx)
- if err != nil {
- return "", nil, status.Errorf(codes.Internal, "failed to get storage setting: %v", err)
- }
- if err := checkUploadSize(setting, spec.TotalSize); err != nil {
- return "", nil, err
- }
- if err := s.checkUploadQuota(ctx, ownerID, spec.TotalSize, setting); err != nil {
+ if err := s.checkUploadQuota(ctx, ownerID, spec.TotalSize); err != nil {
return "", nil, err
}
// Validate before allocating a temporary file. Keep the original MIME type
@@ -162,18 +155,15 @@ func (s *APIService) finishAttachmentUpload(ctx context.Context, upload *attachm
return s.GetAttachment(ctx, &apipb.GetAttachmentRequest{Name: "attachments/" + upload.state.uid})
}
}
+ // Check again at finish: the limits may have changed, and other uploads
+ // of the same user may have finished since this one started.
+ if err := s.checkUploadQuota(ctx, upload.ownerID, upload.totalSize); err != nil {
+ return nil, err
+ }
setting, err := s.Store.GetInstanceStorageSetting(ctx)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get storage setting: %v", err)
}
- if err := checkUploadSize(setting, upload.totalSize); err != nil {
- return nil, err
- }
- // Check again at finish: other uploads of the same user may have finished
- // since this one started.
- if err := s.checkUploadQuota(ctx, upload.ownerID, upload.totalSize, setting); err != nil {
- return nil, err
- }
file, err := os.Open(upload.path)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to open upload file: %v", err)
diff --git a/server/api/attachment_upload_test.go b/server/api/attachment_upload_test.go
index 58d4c2702..5852f9798 100644
--- a/server/api/attachment_upload_test.go
+++ b/server/api/attachment_upload_test.go
@@ -149,6 +149,10 @@ func TestUploadAttachmentValidation(t *testing.T) {
}
_, err = svc.UploadAttachment(ctx, &apipb.UploadAttachmentRequest{Upload: uploadSpec("file", 3), WriteOffset: 1, Data: []byte("abc")})
require.Equal(t, codes.OutOfRange, status.Code(err))
+ _, err = svc.Store.CreateUsageLimit(ctx, &storepb.InstanceUsageLimitsSetting_UsageLimit{
+ Uid: "default-upload", Metric: storepb.InstanceUsageLimitsSetting_UPLOAD_BYTES, Value: 1 << 30,
+ })
+ require.NoError(t, err)
_, err = svc.UploadAttachment(ctx, &apipb.UploadAttachmentRequest{Upload: uploadSpec("file", 1<<60)})
require.Equal(t, codes.ResourceExhausted, status.Code(err))
require.Empty(t, svc.attachmentUploads.entries, "rejected spec calls must not register uploads")
@@ -234,9 +238,10 @@ func TestUploadAttachmentRechecksMemoAndSize(t *testing.T) {
_, err = svc.UploadAttachment(ctx, &apipb.UploadAttachmentRequest{Upload: uploadID(initial.UploadId), Data: []byte("abc"), FinishWrite: true})
require.Equal(t, codes.NotFound, status.Code(err))
+ // A per-file limit set after the upload started applies at finish.
id := startTestUpload(ctx, t, svc, 2*MebiByte)
- _, err = svc.Store.UpsertInstanceSetting(ctx, &storepb.InstanceSetting{Key: storepb.InstanceSettingKey_STORAGE,
- Value: &storepb.InstanceSetting_StorageSetting{StorageSetting: &storepb.InstanceStorageSetting{UploadSizeLimitMb: 1}},
+ _, err = svc.Store.CreateUsageLimit(ctx, &storepb.InstanceUsageLimitsSetting_UsageLimit{
+ Uid: "default-upload", Metric: storepb.InstanceUsageLimitsSetting_UPLOAD_BYTES, Value: MebiByte,
})
require.NoError(t, err)
_, err = svc.UploadAttachment(ctx, &apipb.UploadAttachmentRequest{Upload: uploadID(id), Data: make([]byte, 2*MebiByte), FinishWrite: true})
@@ -288,13 +293,10 @@ func TestUploadAttachmentExpiryAndLimits(t *testing.T) {
func TestUploadAttachmentAboveLegacyRequestLimit(t *testing.T) {
svc, ctx := newUploadTestService(t)
const size = 300 * MebiByte
- _, err := svc.Store.UpsertInstanceSetting(ctx, &storepb.InstanceSetting{Key: storepb.InstanceSettingKey_STORAGE,
- Value: &storepb.InstanceSetting_StorageSetting{StorageSetting: &storepb.InstanceStorageSetting{UploadSizeLimitMb: 400}},
- })
- require.NoError(t, err)
id := startTestUpload(ctx, t, svc, size)
chunk := bytes.Repeat([]byte{0x5a}, uploadChunkSize)
var response *apipb.UploadAttachmentResponse
+ var err error
for offset := int64(0); offset < size; offset += int64(len(chunk)) {
response, err = svc.UploadAttachment(ctx, &apipb.UploadAttachmentRequest{
Upload: uploadID(id), WriteOffset: offset, Data: chunk, FinishWrite: offset+int64(len(chunk)) == size,
diff --git a/server/api/instance_service_converters.go b/server/api/instance_service_converters.go
index a977b719c..bbe71703f 100644
--- a/server/api/instance_service_converters.go
+++ b/server/api/instance_service_converters.go
@@ -163,10 +163,9 @@ func convertInstanceStorageSettingFromStore(settingpb *storepb.InstanceStorageSe
return nil
}
setting := &apipb.InstanceSetting_StorageSetting{
- StorageType: apipb.InstanceSetting_StorageSetting_StorageType(settingpb.StorageType),
- FilepathTemplate: settingpb.FilepathTemplate,
- UploadSizeLimitMb: settingpb.UploadSizeLimitMb,
- DefaultStorageId: settingpb.DefaultStorageId,
+ StorageType: apipb.InstanceSetting_StorageSetting_StorageType(settingpb.StorageType),
+ FilepathTemplate: settingpb.FilepathTemplate,
+ DefaultStorageId: settingpb.DefaultStorageId,
}
for _, storagepb := range settingpb.Storages {
setting.Storages = append(setting.Storages, convertStorageFromStore(storagepb))
@@ -190,10 +189,9 @@ func convertInstanceStorageSettingToStore(setting *apipb.InstanceSetting_Storage
return nil
}
settingpb := &storepb.InstanceStorageSetting{
- StorageType: storepb.InstanceStorageSetting_StorageType(setting.StorageType),
- FilepathTemplate: setting.FilepathTemplate,
- UploadSizeLimitMb: setting.UploadSizeLimitMb,
- DefaultStorageId: setting.DefaultStorageId,
+ StorageType: storepb.InstanceStorageSetting_StorageType(setting.StorageType),
+ FilepathTemplate: setting.FilepathTemplate,
+ DefaultStorageId: setting.DefaultStorageId,
}
for _, storage := range setting.Storages {
settingpb.Storages = append(settingpb.Storages, convertStorageToStore(storage))
diff --git a/server/api/ratelimit.go b/server/api/ratelimit.go
index 13bed8d54..e7ed8c1d6 100644
--- a/server/api/ratelimit.go
+++ b/server/api/ratelimit.go
@@ -34,9 +34,6 @@ const (
// reasonQuotaExceeded marks a refusal by a usage limit. It does not recover
// with time: the user must free space or an admin must raise the limit.
reasonQuotaExceeded = "QUOTA_EXCEEDED"
- // reasonFileTooLarge marks a file larger than the instance upload limit,
- // which applies to every user.
- reasonFileTooLarge = "FILE_TOO_LARGE"
// reasonChallengeRequired marks a request that must carry a valid challenge token.
reasonChallengeRequired = "CHALLENGE_REQUIRED"
@@ -105,26 +102,6 @@ func newQuotaExceededError(username string, refusal *usagelimit.Refusal) error {
return detailed.Err()
}
-// newFileTooLargeError builds the refusal for a file larger than the instance
-// upload limit: RESOURCE_EXHAUSTED with an ErrorInfo carrying the limit and
-// the file size in bytes. It carries no RetryInfo, because waiting does not
-// make the file fit.
-func newFileTooLargeError(limit, size int64) error {
- st := status.New(codes.ResourceExhausted, "file size exceeds the limit")
- detailed, err := st.WithDetails(&errdetails.ErrorInfo{
- Reason: reasonFileTooLarge,
- Domain: errorInfoDomain,
- Metadata: map[string]string{
- "limit": strconv.FormatInt(limit, 10),
- "size": strconv.FormatInt(size, 10),
- },
- })
- if err != nil {
- return st.Err()
- }
- return detailed.Err()
-}
-
func quotaExceededDescription(refusal *usagelimit.Refusal) string {
switch refusal.Metric {
case usagelimit.MetricMemos:
diff --git a/server/api/test/attachment_service_s3_test.go b/server/api/test/attachment_service_s3_test.go
index e96f98187..9a54e89c4 100644
--- a/server/api/test/attachment_service_s3_test.go
+++ b/server/api/test/attachment_service_s3_test.go
@@ -246,10 +246,9 @@ func upsertS3StorageSetting(ctx context.Context, t testing.TB, ts *TestService,
Key: storepb.InstanceSettingKey_STORAGE,
Value: &storepb.InstanceSetting_StorageSetting{
StorageSetting: &storepb.InstanceStorageSetting{
- FilepathTemplate: "attachments/{uuid}_{filename}",
- UploadSizeLimitMb: 30,
- Storages: storages,
- DefaultStorageId: defaultStorageID,
+ FilepathTemplate: "attachments/{uuid}_{filename}",
+ Storages: storages,
+ DefaultStorageId: defaultStorageID,
},
},
})
@@ -267,7 +266,7 @@ func TestS3ObjectKeysStayUniqueWithoutUUIDTemplate(t *testing.T) {
_, err := ts.Store.UpsertInstanceSetting(ctx, &storepb.InstanceSetting{
Key: storepb.InstanceSettingKey_STORAGE,
Value: &storepb.InstanceSetting_StorageSetting{StorageSetting: &storepb.InstanceStorageSetting{
- FilepathTemplate: "files/{filename}", UploadSizeLimitMb: 30, Storages: []*storepb.Storage{storage}, DefaultStorageId: storage.Id,
+ FilepathTemplate: "files/{filename}", Storages: []*storepb.Storage{storage}, DefaultStorageId: storage.Id,
}},
})
require.NoError(t, err)
diff --git a/server/api/test/configuration_provisioning_test.go b/server/api/test/configuration_provisioning_test.go
index 1b0c6f275..da50b7b32 100644
--- a/server/api/test/configuration_provisioning_test.go
+++ b/server/api/test/configuration_provisioning_test.go
@@ -49,7 +49,6 @@ func TestDeploymentConfiguredResourcesRejectMutations(t *testing.T) {
require.Equal(t, int32(1), setting.GetGeneralSetting().WeekStartDayOffset)
storageSetting, err := ts.Service.GetInstanceSetting(adminCtx, &apipb.GetInstanceSettingRequest{Name: "instance/settings/STORAGE"})
require.NoError(t, err)
- require.Equal(t, int64(32), storageSetting.GetStorageSetting().UploadSizeLimitMb)
require.Equal(t, "assets/{timestamp}_{uuid}_{filename}", storageSetting.GetStorageSetting().FilepathTemplate)
_, err = ts.Service.CreateIdentityProvider(adminCtx, &apipb.CreateIdentityProviderRequest{
diff --git a/server/api/test/memo_export_test.go b/server/api/test/memo_export_test.go
index 65f4b19c7..28f3b47ce 100644
--- a/server/api/test/memo_export_test.go
+++ b/server/api/test/memo_export_test.go
@@ -604,16 +604,16 @@ func buildImportArchive(t *testing.T, username string, attachments []struct {
return buf.Bytes()
}
-// A memo that fails to import must not take a pre-existing attachment of the
+// An archive entry larger than the user's per-file limit fails its memo, and
+// a memo that fails to import must not take a pre-existing attachment of the
// user with it: only attachments the run stored are discarded.
func TestImportMemosFailureKeepsPreexistingAttachment(t *testing.T) {
ts := NewTestService(t)
defer ts.Cleanup()
t.Cleanup(ts.Service.CloseUploads)
ctx := context.Background()
- _, err := ts.Store.UpsertInstanceSetting(ctx, &storepb.InstanceSetting{
- Key: storepb.InstanceSettingKey_STORAGE,
- Value: &storepb.InstanceSetting_StorageSetting{StorageSetting: &storepb.InstanceStorageSetting{UploadSizeLimitMb: 1}},
+ _, err := ts.Store.CreateUsageLimit(ctx, &storepb.InstanceUsageLimitsSetting_UsageLimit{
+ Uid: "default-upload", Metric: storepb.InstanceUsageLimitsSetting_UPLOAD_BYTES, Value: 1 << 20,
})
require.NoError(t, err)
user, err := ts.CreateRegularUser(ctx, "keeper")
diff --git a/server/api/test/usage_limit_service_test.go b/server/api/test/usage_limit_service_test.go
index 673ce1d3f..815435e0e 100644
--- a/server/api/test/usage_limit_service_test.go
+++ b/server/api/test/usage_limit_service_test.go
@@ -4,7 +4,6 @@ import (
"context"
"os"
"path/filepath"
- "strconv"
"testing"
"github.com/stretchr/testify/require"
@@ -397,21 +396,20 @@ func TestUploadLimitEnforcement(t *testing.T) {
})
require.Equal(t, codes.NotFound, status.Code(err), "a refused upload is revoked")
- // A per-file limit above the instance upload limit has no effect: the
- // instance error applies unchanged.
- _, err = ts.Service.UpdateUsageLimit(adminCtx, &apipb.UpdateUsageLimitRequest{UsageLimit: &apipb.UsageLimit{Name: "usageLimits/default-upload", Value: 1 << 40}})
- require.NoError(t, err)
+ // A user's own per-file limit replaces the default in either direction.
_, err = ts.Service.UpdateUsageLimit(adminCtx, &apipb.UpdateUsageLimitRequest{UsageLimit: &apipb.UsageLimit{Name: "usageLimits/default-storage", Value: 0}})
require.NoError(t, err)
- err = create(33 << 20)
- st := status.Convert(err)
- require.Equal(t, codes.ResourceExhausted, st.Code())
- require.Equal(t, "file size exceeds the limit", st.Message())
- require.Len(t, st.Details(), 1)
- info, ok := st.Details()[0].(*errdetails.ErrorInfo)
- require.True(t, ok, "the instance limit refusal carries an ErrorInfo")
- require.Equal(t, "FILE_TOO_LARGE", info.Reason)
- require.Equal(t, map[string]string{"limit": strconv.Itoa(32 << 20), "size": strconv.Itoa(33 << 20)}, info.Metadata)
+ createUsageLimit(adminCtx, t, ts, "user-upload", apipb.UsageLimit_UPLOAD_BYTES, subject, 1<<20)
+ require.NoError(t, create(1<<20))
+ metadata = requireQuotaExceeded(t, create(1<<20+1), "UPLOAD_BYTES", subject)
+ require.Equal(t, "usageLimits/user-upload", metadata["usage_limit"])
+
+ // Without any per-file limit, a file of any size is accepted.
+ _, err = ts.Service.DeleteUsageLimit(adminCtx, &apipb.DeleteUsageLimitRequest{Name: "usageLimits/user-upload"})
+ require.NoError(t, err)
+ _, err = ts.Service.DeleteUsageLimit(adminCtx, &apipb.DeleteUsageLimitRequest{Name: "usageLimits/default-upload"})
+ require.NoError(t, err)
+ require.NoError(t, create(33<<20))
}
func TestGetUserUsagePermissions(t *testing.T) {
diff --git a/server/api/usage_limit_service.go b/server/api/usage_limit_service.go
index c3f6e9127..3b97cc21b 100644
--- a/server/api/usage_limit_service.go
+++ b/server/api/usage_limit_service.go
@@ -307,9 +307,20 @@ func (s *APIService) checkMemoQuota(ctx context.Context, user *store.User) error
}
// checkUploadQuota refuses an upload of size bytes that would break the
-// per-file or storage limit of the user. Call it after checkUploadSize.
-func (s *APIService) checkUploadQuota(ctx context.Context, userID int32, size int64, setting *storepb.InstanceStorageSetting) error {
- err := usagelimit.CheckUpload(ctx, s.Store, userID, size, attachmentUploadLimit(setting))
+// per-file or storage limit of the user.
+func (s *APIService) checkUploadQuota(ctx context.Context, userID int32, size int64) error {
+ return s.uploadQuotaError(ctx, userID, usagelimit.CheckUpload(ctx, s.Store, userID, size))
+}
+
+// checkFileSizeQuota refuses a file of size bytes that is larger than the
+// per-file limit of the user. It runs no count or sum query.
+func (s *APIService) checkFileSizeQuota(ctx context.Context, userID int32, size int64) error {
+ return s.uploadQuotaError(ctx, userID, usagelimit.CheckFileSize(ctx, s.Store, userID, size))
+}
+
+// uploadQuotaError maps an upload check result to a service error, naming the
+// user in a refusal.
+func (s *APIService) uploadQuotaError(ctx context.Context, userID int32, err error) error {
if err == nil {
return nil
}
diff --git a/server/api/user_service_memo_import.go b/server/api/user_service_memo_import.go
index f24e8a0ba..e656dc963 100644
--- a/server/api/user_service_memo_import.go
+++ b/server/api/user_service_memo_import.go
@@ -501,7 +501,7 @@ func (i *memoImporter) storeAttachment(entry *memoexport.Attachment, uid, mimeTy
}
return AttachmentNamePrefix + attachment.UID, nil
}
- if err := checkUploadSize(i.storageSetting, entry.Size); err != nil {
+ if err := i.service.checkFileSizeQuota(i.ctx, i.user.ID, entry.Size); err != nil {
return "", err
}
data, err := i.archive.ReadAttachment(entry)
diff --git a/server/fileserver/fileserver_test.go b/server/fileserver/fileserver_test.go
index 03bb06ede..dc584643e 100644
--- a/server/fileserver/fileserver_test.go
+++ b/server/fileserver/fileserver_test.go
@@ -52,10 +52,9 @@ func TestServeAttachmentFile_S3(t *testing.T) {
_, err := stores.UpsertInstanceSetting(ctx, &storepb.InstanceSetting{
Key: storepb.InstanceSettingKey_STORAGE,
Value: &storepb.InstanceSetting_StorageSetting{StorageSetting: &storepb.InstanceStorageSetting{
- FilepathTemplate: "files/{uuid}_{filename}",
- UploadSizeLimitMb: 30,
- Storages: []*storepb.Storage{configuredStorage},
- DefaultStorageId: configuredStorage.Id,
+ FilepathTemplate: "files/{uuid}_{filename}",
+ Storages: []*storepb.Storage{configuredStorage},
+ DefaultStorageId: configuredStorage.Id,
}},
})
require.NoError(t, err)
diff --git a/store/deployment_config.go b/store/deployment_config.go
index 77b797f0a..46a7a3b30 100644
--- a/store/deployment_config.go
+++ b/store/deployment_config.go
@@ -239,9 +239,6 @@ func validateAndNormalizeDeploymentInstanceSetting(setting *storepb.InstanceSett
return errors.New("storageSetting.s3Config is required for S3")
}
NormalizeInstanceStorageSetting(storage)
- if storage.UploadSizeLimitMb < 0 {
- return errors.New("storageSetting.uploadSizeLimitMb must not be negative")
- }
defaultStorage := GetDefaultStorage(storage)
if defaultStorage != nil && defaultStorage.Type == storepb.StorageType_STORAGE_TYPE_S3 {
s3Config := defaultStorage.GetS3Config()
diff --git a/store/instance_setting.go b/store/instance_setting.go
index c678ff25e..3047674a2 100644
--- a/store/instance_setting.go
+++ b/store/instance_setting.go
@@ -376,9 +376,8 @@ func (s *Store) GetInstanceAISetting(ctx context.Context) (*storepb.InstanceAISe
}
const (
- defaultInstanceStorageType = storepb.InstanceStorageSetting_LOCAL
- defaultInstanceUploadSizeLimitMb = 32
- defaultInstanceFilepathTemplate = "assets/{timestamp}_{uuid}_{filename}"
+ defaultInstanceStorageType = storepb.InstanceStorageSetting_LOCAL
+ defaultInstanceFilepathTemplate = "assets/{timestamp}_{uuid}_{filename}"
)
func (s *Store) GetInstanceStorageSetting(ctx context.Context) (*storepb.InstanceStorageSetting, error) {
@@ -398,9 +397,6 @@ func (s *Store) GetInstanceStorageSetting(ctx context.Context) (*storepb.Instanc
if instanceStorageSetting.StorageType == storepb.InstanceStorageSetting_STORAGE_TYPE_UNSPECIFIED {
instanceStorageSetting.StorageType = defaultInstanceStorageType
}
- if instanceStorageSetting.UploadSizeLimitMb == 0 {
- instanceStorageSetting.UploadSizeLimitMb = defaultInstanceUploadSizeLimitMb
- }
if instanceStorageSetting.FilepathTemplate == "" {
instanceStorageSetting.FilepathTemplate = defaultInstanceFilepathTemplate
}
diff --git a/store/test/instance_setting_test.go b/store/test/instance_setting_test.go
index 634a1898f..78c5255a8 100644
--- a/store/test/instance_setting_test.go
+++ b/store/test/instance_setting_test.go
@@ -285,7 +285,6 @@ func TestInstanceSettingStorageSetting(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, storageSetting)
require.Equal(t, storepb.InstanceStorageSetting_LOCAL, storageSetting.StorageType)
- require.Equal(t, int64(32), storageSetting.UploadSizeLimitMb)
require.Equal(t, "assets/{timestamp}_{uuid}_{filename}", storageSetting.FilepathTemplate)
// Set custom storage setting
@@ -293,9 +292,8 @@ func TestInstanceSettingStorageSetting(t *testing.T) {
Key: storepb.InstanceSettingKey_STORAGE,
Value: &storepb.InstanceSetting_StorageSetting{
StorageSetting: &storepb.InstanceStorageSetting{
- StorageType: storepb.InstanceStorageSetting_LOCAL,
- UploadSizeLimitMb: 100,
- FilepathTemplate: "uploads/{date}/{filename}",
+ StorageType: storepb.InstanceStorageSetting_LOCAL,
+ FilepathTemplate: "uploads/{date}/{filename}",
},
},
})
@@ -305,7 +303,6 @@ func TestInstanceSettingStorageSetting(t *testing.T) {
storageSetting, err = ts.GetInstanceStorageSetting(ctx)
require.NoError(t, err)
require.Equal(t, storepb.InstanceStorageSetting_LOCAL, storageSetting.StorageType)
- require.Equal(t, int64(100), storageSetting.UploadSizeLimitMb)
require.Equal(t, "uploads/{date}/{filename}", storageSetting.FilepathTemplate)
ts.Close()
diff --git a/web/src/components/MemoEditor/services/errorService.ts b/web/src/components/MemoEditor/services/errorService.ts
index 6921288b8..ffe3805b8 100644
--- a/web/src/components/MemoEditor/services/errorService.ts
+++ b/web/src/components/MemoEditor/services/errorService.ts
@@ -1,8 +1,8 @@
-import { getLimitErrorMessage } from "@/lib/error";
+import { getQuotaExceededMessage } from "@/lib/error";
export const errorService = {
getErrorMessage(error: unknown): string {
- const limitMessage = getLimitErrorMessage(error);
+ const limitMessage = getQuotaExceededMessage(error);
if (limitMessage !== undefined) {
return limitMessage;
}
diff --git a/web/src/components/Settings/StorageSection.tsx b/web/src/components/Settings/StorageSection.tsx
index 872048a01..2a792a209 100644
--- a/web/src/components/Settings/StorageSection.tsx
+++ b/web/src/components/Settings/StorageSection.tsx
@@ -170,10 +170,6 @@ const StorageSection = () => {
}, [originalSetting]);
const allowSaveStorageSetting = useMemo(() => {
- if (instanceStorageSetting.uploadSizeLimitMb <= 0) {
- return false;
- }
-
if (selectedStorageType === InstanceSetting_StorageType.LOCAL) {
if (instanceStorageSetting.filepathTemplate.length === 0) {
return false;
@@ -193,19 +189,6 @@ const StorageSection = () => {
return !isEqual(originalSetting, canonicalizeStorageSetting(instanceStorageSetting, originalSetting));
}, [canReuseSelectedS3Secret, instanceStorageSetting, originalSetting, selectedS3Config, selectedStorageType]);
- const handleMaxUploadSizeChanged = (event: React.ChangeEvent<HTMLInputElement>) => {
- let num = parseInt(event.target.value);
- if (Number.isNaN(num)) {
- num = 0;
- }
- setInstanceStorageSetting((current) =>
- create(InstanceSetting_StorageSettingSchema, {
- ...current,
- uploadSizeLimitMb: BigInt(num),
- }),
- );
- };
-
const handleFilepathTemplateChanged = (event: React.ChangeEvent<HTMLInputElement>) => {
setInstanceStorageSetting((current) =>
create(InstanceSetting_StorageSettingSchema, {
@@ -357,14 +340,6 @@ const StorageSection = () => {
</ul>
</SettingPanel>
- <SettingRow label={t("setting.system.max-upload-size")} tooltip={t("setting.system.max-upload-size-hint")}>
- <Input
- className="w-24 font-mono"
- value={String(instanceStorageSetting.uploadSizeLimitMb)}
- onChange={handleMaxUploadSizeChanged}
- />
- </SettingRow>
-
{selectedStorageType !== InstanceSetting_StorageType.DATABASE && (
<SettingRow
label={t("setting.storage.filepath-template")}
diff --git a/web/src/components/Settings/UsageLimitDialog.tsx b/web/src/components/Settings/UsageLimitDialog.tsx
index 77f153b4f..578d977d2 100644
--- a/web/src/components/Settings/UsageLimitDialog.tsx
+++ b/web/src/components/Settings/UsageLimitDialog.tsx
@@ -10,7 +10,7 @@ import { handleError } from "@/lib/error";
import { UsageLimit_Metric } from "@/types/proto/api/instance_service_pb";
import type { User } from "@/types/proto/api/user_service_pb";
import { useTranslate } from "@/utils/i18n";
-import { isFileSizeLimitIneffective, parseLimitInput, toLimitInput } from "./usageLimitValues";
+import { parseLimitInput, toLimitInput } from "./usageLimitValues";
type Inputs = Record<UsageLimit_Metric, string>;
@@ -23,8 +23,6 @@ interface Props {
target: UsageLimitDialogTarget;
/** The users that can be added, which are those without limits of their own. */
candidates: User[];
- /** The instance upload limit in MiB, for the file size warning. */
- uploadLimitMiB: number;
}
const userLabel = (user: User) => (user.displayName ? `${user.displayName} (@${user.username})` : `@${user.username}`);
@@ -34,7 +32,7 @@ const userLabel = (user: User) => (user.displayName ? `${user.displayName} (@${u
* means no limit. For one user, an empty field means the all-users limit
* applies, and 0 means no limit for that user.
*/
-function UsageLimitDialog({ open, onOpenChange, target, candidates, uploadLimitMiB }: Props) {
+function UsageLimitDialog({ open, onOpenChange, target, candidates }: Props) {
const t = useTranslate();
const { data: limits } = useUsageLimits({ enabled: open });
const [pickedName, setPickedName] = useState("");
@@ -78,13 +76,7 @@ function UsageLimitDialog({ open, onOpenChange, target, candidates, uploadLimitM
value: value ? toLimitInput(metric, value) : t("setting.usage-limits.unlimited"),
});
};
- const warning = (metric: UsageLimit_Metric) => {
- if (isInvalid(metric)) return t("setting.usage-limits.invalid");
- if (metric === UsageLimit_Metric.UPLOAD_BYTES && isFileSizeLimitIneffective(inputs[metric], uploadLimitMiB)) {
- return t("setting.usage-limits.file-size-warning", { limit: uploadLimitMiB });
- }
- return undefined;
- };
+ const warning = (metric: UsageLimit_Metric) => (isInvalid(metric) ? t("setting.usage-limits.invalid") : undefined);
const hasChanges = USAGE_LIMIT_METRICS.some((metric) => inputs[metric] !== savedInputs[metric]);
const isValid = USAGE_LIMIT_METRICS.every((metric) => !isInvalid(metric));
diff --git a/web/src/components/Settings/UsageLimitsSection.tsx b/web/src/components/Settings/UsageLimitsSection.tsx
index f4c3b8545..ec6cb846d 100644
--- a/web/src/components/Settings/UsageLimitsSection.tsx
+++ b/web/src/components/Settings/UsageLimitsSection.tsx
@@ -6,12 +6,11 @@ import ConfirmDialog from "@/components/ConfirmDialog";
import UserAvatar from "@/components/UserAvatar";
import { Button } from "@/components/ui/button";
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
-import { useInstanceSetting } from "@/hooks/useInstanceQueries";
import { findUsageLimit, USAGE_LIMIT_METRICS, useSetUsageLimit, useUsageLimits } from "@/hooks/useUsageLimitQueries";
import { useListUsers } from "@/hooks/useUserQueries";
import { handleError } from "@/lib/error";
import { cn } from "@/lib/utils";
-import { InstanceSetting_Key, UsageLimit_Metric } from "@/types/proto/api/instance_service_pb";
+import { UsageLimit_Metric } from "@/types/proto/api/instance_service_pb";
import { User } from "@/types/proto/api/user_service_pb";
import { useTranslate } from "@/utils/i18n";
import SettingSection from "./SettingSection";
@@ -19,9 +18,6 @@ import SettingTable from "./SettingTable";
import UsageLimitDialog, { type UsageLimitDialogTarget } from "./UsageLimitDialog";
import { formatLimitValue } from "./usageLimitValues";
-// The store applies 32 MiB when the instance upload limit is unset.
-const DEFAULT_UPLOAD_LIMIT_MIB = 32;
-
/**
* A table row: name is empty for the all-users row, otherwise users/{user}.
* The user is missing when the user list has not loaded.
@@ -36,7 +32,6 @@ const UsageLimitsSection = () => {
const t = useTranslate();
const { data: limits, isLoading } = useUsageLimits();
const { data: users = [] } = useListUsers();
- const { data: storageSetting } = useInstanceSetting(InstanceSetting_Key.STORAGE);
const setUsageLimit = useSetUsageLimit();
const [dialog, setDialog] = useState<{ open: boolean; target: UsageLimitDialogTarget }>({ open: false, target: { kind: "all" } });
const [removeTarget, setRemoveTarget] = useState<LimitRow | undefined>();
@@ -57,10 +52,6 @@ const UsageLimitsSection = () => {
[users, userRows],
);
- const uploadLimitMiB =
- (storageSetting?.value.case === "storageSetting" ? Number(storageSetting.value.value.uploadSizeLimitMb) : 0) ||
- DEFAULT_UPLOAD_LIMIT_MIB;
-
const openDialog = (target: UsageLimitDialogTarget) => setDialog({ open: true, target });
const handleRemove = async () => {
@@ -184,7 +175,6 @@ const UsageLimitsSection = () => {
onOpenChange={(open) => setDialog((current) => ({ ...current, open }))}
target={dialog.target}
candidates={candidates}
- uploadLimitMiB={uploadLimitMiB}
/>
<ConfirmDialog
diff --git a/web/src/components/Settings/settingSections.ts b/web/src/components/Settings/settingSections.ts
index f07f6f6e2..afdf29c76 100644
--- a/web/src/components/Settings/settingSections.ts
+++ b/web/src/components/Settings/settingSections.ts
@@ -150,7 +150,6 @@ export const SETTINGS_SECTIONS: SettingSectionDefinition[] = [
labelKey: "setting.usage-limits.label",
icon: GaugeIcon,
component: UsageLimitsSection,
- preloadSettingKeys: [InstanceSetting_Key.STORAGE],
},
{
key: "notification",
diff --git a/web/src/components/Settings/usageLimitValues.ts b/web/src/components/Settings/usageLimitValues.ts
index 383f1c6d9..bb6e75e0f 100644
--- a/web/src/components/Settings/usageLimitValues.ts
+++ b/web/src/components/Settings/usageLimitValues.ts
@@ -32,9 +32,3 @@ export function parseLimitInput(metric: UsageLimit_Metric, input: string): bigin
export function formatLimitValue(metric: UsageLimit_Metric, value: bigint): string {
return isByteMetric(metric) ? formatFileSize(Number(value)) : value.toLocaleString();
}
-
-/** Whether a file size limit, entered in MiB, is not below the instance upload limit and so has no effect. */
-export function isFileSizeLimitIneffective(input: string, instanceUploadLimitMiB: number): boolean {
- const value = parseLimitInput(UsageLimit_Metric.UPLOAD_BYTES, input);
- return value !== undefined && value > 0n && value >= BigInt(instanceUploadLimitMiB) * BigInt(MIB);
-}
diff --git a/web/src/lib/error.ts b/web/src/lib/error.ts
index 5ac260b36..ed8793980 100644
--- a/web/src/lib/error.ts
+++ b/web/src/lib/error.ts
@@ -12,7 +12,6 @@ export interface ErrorInfo {
export const ERROR_REASON_RATE_LIMITED = "RATE_LIMITED";
export const ERROR_REASON_CHALLENGE_REQUIRED = "CHALLENGE_REQUIRED";
export const ERROR_REASON_QUOTA_EXCEEDED = "QUOTA_EXCEEDED";
-export const ERROR_REASON_FILE_TOO_LARGE = "FILE_TOO_LARGE";
const ERROR_INFO_TYPE = "google.rpc.ErrorInfo";
@@ -105,23 +104,6 @@ export function getQuotaExceededMessage(error: unknown): string | undefined {
}
}
-/**
- * Describes a refusal by a size or usage limit in words: QUOTA_EXCEEDED, or
- * FILE_TOO_LARGE for the instance upload limit. Returns undefined for any
- * other error.
- */
-export function getLimitErrorMessage(error: unknown): string | undefined {
- const quotaMessage = getQuotaExceededMessage(error);
- if (quotaMessage !== undefined) {
- return quotaMessage;
- }
- const info = getErrorInfo(error);
- if (info?.reason !== ERROR_REASON_FILE_TOO_LARGE) {
- return undefined;
- }
- return `This file is larger than the upload limit of ${formatFileSize(Number(info.metadata.limit ?? ""))}.`;
-}
-
function formatWait(seconds: number): string {
if (seconds < 60) return `${seconds}s`;
const minutes = Math.ceil(seconds / 60);
@@ -141,7 +123,7 @@ export function getErrorMessage(error: unknown, fallback = "Unknown error"): str
if (hasErrorReason(error, ERROR_REASON_CHALLENGE_REQUIRED)) {
return "Complete the verification challenge and try again.";
}
- const limitMessage = getLimitErrorMessage(error);
+ const limitMessage = getQuotaExceededMessage(error);
if (limitMessage !== undefined) {
return limitMessage;
}
diff --git a/web/src/locales/ar.json b/web/src/locales/ar.json
index 6fc0a353a..b2caa5d28 100644
--- a/web/src/locales/ar.json
+++ b/web/src/locales/ar.json
@@ -496,8 +496,6 @@
"title": "تخصيص الخادم"
},
"enable-double-click-to-edit": "تمكين النقر المزدوج للتحرير",
- "max-upload-size": "الحد الأقصى لحجم الرفع (ميغابايت)",
- "max-upload-size-hint": "القيمة الموصى بها هي 32 ميغابايت.",
"server-name": "اسم الخادم",
"label": "النظام",
"additional-script-description": "إضافة جافا سكريبت إلى جميع صفحات الويب. استخدام التعليمات البرمجية الموثوقة فقط.",
@@ -607,7 +605,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/az.json b/web/src/locales/az.json
index 7aacfb387..8e552d982 100644
--- a/web/src/locales/az.json
+++ b/web/src/locales/az.json
@@ -908,8 +908,6 @@
"custom-code-title": "Xüsusi kod",
"enable-double-click-to-edit": "Redaktə üçün ikiqat kliki aktivləşdir",
"label": "Sistem",
- "max-upload-size": "Maksimum yükləmə ölçüsü (MiB)",
- "max-upload-size-hint": "Tövsiyə olunan dəyər 32 MiB-dir.",
"server-name": "Server adı"
},
"usage-limits": {
@@ -922,7 +920,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/bg.json b/web/src/locales/bg.json
index 0d365adfb..dfc75630a 100644
--- a/web/src/locales/bg.json
+++ b/web/src/locales/bg.json
@@ -714,8 +714,6 @@
"custom-code-title": "Персонализиран код",
"enable-double-click-to-edit": "Активирайте двойното щракване за редактиране",
"label": "система",
- "max-upload-size": "Максимален размер за качване (MiB)",
- "max-upload-size-hint": "Препоръчителната стойност е 32 MiB.",
"server-name": "Име на сървъра"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/ca.json b/web/src/locales/ca.json
index 910ab4713..27fa9bc8a 100644
--- a/web/src/locales/ca.json
+++ b/web/src/locales/ca.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Habilita doble clic per editar",
"label": "Sistema",
- "max-upload-size": "Mida màxima de pujada (MiB)",
- "max-upload-size-hint": "El valor recomanat és 32 MiB.",
"server-name": "Nom del servidor",
"additional-script-description": "Injecteu JavaScript a cada pàgina web. Utilitzeu només codi de confiança.",
"additional-style-description": "Injecteu CSS a l'aplicació web per ajustar la presentació a tota la instància.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/cs.json b/web/src/locales/cs.json
index 3b66e4381..7b1907db8 100644
--- a/web/src/locales/cs.json
+++ b/web/src/locales/cs.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Povolit dvojklik pro editaci",
"label": "Systém",
- "max-upload-size": "Maximální velikost nahrávaného souboru (MiB)",
- "max-upload-size-hint": "Doporučená hodnota je 32 MiB.",
"server-name": "Název serveru",
"additional-script-description": "Vložte JavaScript do každé webové stránky. Používejte pouze důvěryhodný kód.",
"additional-style-description": "Vložením CSS do webové aplikace upravíte prezentaci v rámci celé instance.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/da.json b/web/src/locales/da.json
index 9e4448bb0..7a07f57bd 100644
--- a/web/src/locales/da.json
+++ b/web/src/locales/da.json
@@ -714,8 +714,6 @@
"custom-code-title": "Brugerdefineret kode",
"enable-double-click-to-edit": "Aktiver dobbeltklik for at redigere",
"label": "System",
- "max-upload-size": "Maksimal uploadstørrelse (MiB)",
- "max-upload-size-hint": "Den anbefalede værdi er 32 MiB.",
"server-name": "Servernavn"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/de.json b/web/src/locales/de.json
index 66922e8a7..fc3192941 100644
--- a/web/src/locales/de.json
+++ b/web/src/locales/de.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Doppelklick zum Bearbeiten aktivieren",
"label": "System",
- "max-upload-size": "Maximale Uploadgröße (MiB)",
- "max-upload-size-hint": "Empfohlener Wert ist 32 MiB.",
"server-name": "Servername",
"additional-script-description": "Fügen Sie JavaScript in jede Webseite ein. Verwenden Sie nur vertrauenswürdigen Code.",
"additional-style-description": "Fügen Sie CSS in die Web-App ein, um die instanzweite Darstellung anzupassen.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/el.json b/web/src/locales/el.json
index e362b9160..a0455e48d 100644
--- a/web/src/locales/el.json
+++ b/web/src/locales/el.json
@@ -714,8 +714,6 @@
"custom-code-title": "Προσαρμοσμένος κωδικός",
"enable-double-click-to-edit": "Ενεργοποιήστε το διπλό κλικ για επεξεργασία",
"label": "Σύστημα",
- "max-upload-size": "Μέγιστο μέγεθος μεταφόρτωσης (MiB)",
- "max-upload-size-hint": "Η συνιστώμενη τιμή είναι 32 MiB.",
"server-name": "Όνομα διακομιστή"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/en-GB.json b/web/src/locales/en-GB.json
index 09652f3e4..8abceff6a 100644
--- a/web/src/locales/en-GB.json
+++ b/web/src/locales/en-GB.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Enable double click to edit",
"label": "System",
- "max-upload-size": "Maximum upload size (MiB)",
- "max-upload-size-hint": "Recommended value is 32 MiB.",
"server-name": "Server Name",
"additional-script-description": "Inject JavaScript into every web page. Use only trusted code.",
"additional-style-description": "Inject CSS into the web app to adjust instance-wide presentation.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/en.json b/web/src/locales/en.json
index eb69170f6..e0cd7c45f 100644
--- a/web/src/locales/en.json
+++ b/web/src/locales/en.json
@@ -908,8 +908,6 @@
"custom-code-title": "Custom code",
"enable-double-click-to-edit": "Enable double click to edit",
"label": "System",
- "max-upload-size": "Maximum upload size (MiB)",
- "max-upload-size-hint": "Recommended value is 32 MiB.",
"server-name": "Server Name"
},
"usage-limits": {
@@ -922,7 +920,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/es.json b/web/src/locales/es.json
index 4d0ad824b..cdc91765a 100644
--- a/web/src/locales/es.json
+++ b/web/src/locales/es.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Habilitar doble clic para editar",
"label": "Sistema",
- "max-upload-size": "Tamaño máximo de subida (MiB)",
- "max-upload-size-hint": "El valor recomendado es 32 MiB.",
"server-name": "Nombre del servidor",
"additional-script-description": "Inyecte JavaScript en cada página web. Utilice únicamente código confiable.",
"additional-style-description": "Inyecte CSS en la aplicación web para ajustar la presentación de toda la instancia.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/et.json b/web/src/locales/et.json
index d16e505db..c6879b9f6 100644
--- a/web/src/locales/et.json
+++ b/web/src/locales/et.json
@@ -714,8 +714,6 @@
"custom-code-title": "Kohandatud kood",
"enable-double-click-to-edit": "Redigeerimiseks lubage topeltklõps",
"label": "Süsteem",
- "max-upload-size": "Maksimaalne üleslaadimise suurus (MiB)",
- "max-upload-size-hint": "Soovitatav väärtus on 32 MiB.",
"server-name": "Serveri nimi"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/fa.json b/web/src/locales/fa.json
index 8580c181b..de4414bf3 100644
--- a/web/src/locales/fa.json
+++ b/web/src/locales/fa.json
@@ -496,8 +496,6 @@
"title": "سفارشی‌سازی سرور"
},
"enable-double-click-to-edit": "فعال‌سازی دوبار کلیک برای ویرایش",
- "max-upload-size": "حداکثر حجم بارگذاری (مگابایت)",
- "max-upload-size-hint": "مقدار پیشنهادی ۳۲ مگابایت است.",
"server-name": "نام سرور",
"label": "سیستم",
"additional-script-description": "جاوا اسکریپت را به هر صفحه وب تزریق کنید. فقط از کد قابل اعتماد استفاده کنید.",
@@ -607,7 +605,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/fi.json b/web/src/locales/fi.json
index 335c29dc3..783b06c33 100644
--- a/web/src/locales/fi.json
+++ b/web/src/locales/fi.json
@@ -714,8 +714,6 @@
"custom-code-title": "Mukautettu koodi",
"enable-double-click-to-edit": "Ota muokkaus käyttöön kaksoisnapsauttamalla",
"label": "Järjestelmä",
- "max-upload-size": "Suurin latauskoko (MiB)",
- "max-upload-size-hint": "Suositeltu arvo on 32 MiB.",
"server-name": "Palvelimen nimi"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/fr.json b/web/src/locales/fr.json
index 0510ee111..fb7db0e8d 100644
--- a/web/src/locales/fr.json
+++ b/web/src/locales/fr.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Activer le double-clic pour éditer",
"label": "Système",
- "max-upload-size": "Taille maximale de téléversement (MiB)",
- "max-upload-size-hint": "La valeur recommandée est 32 MiB.",
"server-name": "Nom du serveur",
"additional-script-description": "Injectez JavaScript dans chaque page Web. Utilisez uniquement du code fiable.",
"additional-style-description": "Injectez CSS dans l'application Web pour ajuster la présentation à l'échelle de l'instance.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/gl.json b/web/src/locales/gl.json
index 237769ef5..7da03d85c 100644
--- a/web/src/locales/gl.json
+++ b/web/src/locales/gl.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Activar dobre pulsación para editar",
"label": "Sistema",
- "max-upload-size": "Tamaño máximo de subida (MiB)",
- "max-upload-size-hint": "O valor recomendado é 32 MiB.",
"server-name": "Nome do servidor",
"additional-script-description": "Inxecta JavaScript en cada páxina web. Use só código de confianza.",
"additional-style-description": "Inxecta CSS na aplicación web para axustar a presentación en toda a instancia.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/he.json b/web/src/locales/he.json
index 780f0ecc0..bb65fb09d 100644
--- a/web/src/locales/he.json
+++ b/web/src/locales/he.json
@@ -747,8 +747,6 @@
"custom-code-title": "קוד מותאם אישית",
"enable-double-click-to-edit": "אפשר לחיצה כפולה לעריכה",
"label": "מערכת",
- "max-upload-size": "גודל העלאה מרבי (MiB)",
- "max-upload-size-hint": "הערך המומלץ הוא 32 MiB.",
"server-name": "שם השרת"
},
"usage-limits": {
@@ -761,7 +759,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/hi.json b/web/src/locales/hi.json
index 06f10a3ec..3b9894cc2 100644
--- a/web/src/locales/hi.json
+++ b/web/src/locales/hi.json
@@ -496,8 +496,6 @@
"title": "सर्वर अनुकूलित करें"
},
"enable-double-click-to-edit": "डबल क्लिक से संपादन सक्षम करें",
- "max-upload-size": "अधिकतम अपलोड आकार (MiB)",
- "max-upload-size-hint": "अनुशंसित मान 32 MiB है।",
"server-name": "सर्वर नाम",
"label": "सिस्टम",
"additional-script-description": "हर वेब पेज में JavaScript डालें। सिर्फ़ भरोसेमंद कोड का इस्तेमाल करें।",
@@ -607,7 +605,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/hr.json b/web/src/locales/hr.json
index 8c47d48f0..768c42378 100644
--- a/web/src/locales/hr.json
+++ b/web/src/locales/hr.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Omogući dvostruki klik za uređivanje",
"label": "Sustav",
- "max-upload-size": "Maksimalna veličina prijenosa (MiB)",
- "max-upload-size-hint": "Preporučena vrijednost je 32 MiB.",
"server-name": "Naziv servera",
"additional-script-description": "Ubacite JavaScript u svaku web stranicu. Koristite samo pouzdani kod.",
"additional-style-description": "Ubacite CSS u web-aplikaciju da prilagodite prezentaciju cijele instance.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/hu.json b/web/src/locales/hu.json
index 08850a8cf..591904c76 100644
--- a/web/src/locales/hu.json
+++ b/web/src/locales/hu.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Dupla kattintásos szerkesztés engedélyezése",
"label": "Rendszer",
- "max-upload-size": "Maximális feltöltési méret (MiB)",
- "max-upload-size-hint": "Az ajánlott érték 32 MiB.",
"server-name": "Szerver neve",
"additional-script-description": "Szúrja be az JavaScript-et minden weboldalba. Csak megbízható kódot használjon.",
"additional-style-description": "Szúrja be az CSS-et a webalkalmazásba a példányszintű megjelenítés beállításához.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/id.json b/web/src/locales/id.json
index cb9c7c839..170108df4 100644
--- a/web/src/locales/id.json
+++ b/web/src/locales/id.json
@@ -496,8 +496,6 @@
"title": "Sesuaikan Server"
},
"enable-double-click-to-edit": "Aktifkan klik ganda untuk mengedit",
- "max-upload-size": "Ukuran unggah maksimum (MiB)",
- "max-upload-size-hint": "Nilai yang direkomendasikan adalah 32 MiB.",
"server-name": "Nama Server",
"label": "Sistem",
"additional-script-description": "Suntikkan JavaScript ke setiap halaman web. Gunakan hanya kode tepercaya.",
@@ -607,7 +605,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/it.json b/web/src/locales/it.json
index 3f1eca885..86a81ac7d 100644
--- a/web/src/locales/it.json
+++ b/web/src/locales/it.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Abilita doppio click per modificare",
"label": "Sistema",
- "max-upload-size": "Dimensione massima caricamento (MiB)",
- "max-upload-size-hint": "Valore consigliato di 32 MiB.",
"server-name": "Nome server",
"additional-script-description": "Inietta JavaScript in ogni pagina web. Utilizza solo codice attendibile.",
"additional-style-description": "Inserisci CSS nell'app Web per regolare la presentazione a livello di istanza.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/ja.json b/web/src/locales/ja.json
index cdedce44f..763f2c8aa 100644
--- a/web/src/locales/ja.json
+++ b/web/src/locales/ja.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "ダブルクリック編集を有効化",
"label": "システム",
- "max-upload-size": "最大アップロードサイズ(MiB)",
- "max-upload-size-hint": "推奨値は32 MiBです。",
"server-name": "サーバー名",
"additional-script-description": "JavaScript をすべての Web ページに挿入します。 信頼できるコードのみを使用してください。",
"additional-style-description": "CSS を Web アプリに挿入して、インスタンス全体のプレゼンテーションを調整します。",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/ka-GE.json b/web/src/locales/ka-GE.json
index 1e92bab55..f2b4aec06 100644
--- a/web/src/locales/ka-GE.json
+++ b/web/src/locales/ka-GE.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "ორმაგი დაწკაპუნებით რედაქტირების ჩართვა",
"label": "სისტემა",
- "max-upload-size": "მაქსიმალური ატვირთვის ზომა (MiB)",
- "max-upload-size-hint": "რეკომენდირებული ზომა არის 32 MiB.",
"server-name": "სერვერის სახელი",
"additional-script-description": "შეიტანეთ JavaScript ყველა ვებ გვერდზე. გამოიყენეთ მხოლოდ სანდო კოდი.",
"additional-style-description": "შეიტანეთ CSS ვებ აპში, რათა დაარეგულიროთ პრეზენტაცია მაგალითზე.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/ko.json b/web/src/locales/ko.json
index 0d368dc58..6fac393d6 100644
--- a/web/src/locales/ko.json
+++ b/web/src/locales/ko.json
@@ -496,8 +496,6 @@
"title": "서버 커스터마이징"
},
"enable-double-click-to-edit": "더블 클릭으로 편집 활성화",
- "max-upload-size": "최대 업로드 크기 (MiB)",
- "max-upload-size-hint": "권장값은 32 MiB입니다.",
"server-name": "서버 이름",
"label": "시스템",
"additional-script-description": "모든 웹 페이지에 JavaScript를 삽입합니다. 신뢰할 수 있는 코드만 사용합니다.",
@@ -607,7 +605,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/lt.json b/web/src/locales/lt.json
index 7985a2708..de98215a1 100644
--- a/web/src/locales/lt.json
+++ b/web/src/locales/lt.json
@@ -714,8 +714,6 @@
"custom-code-title": "Pasirinktinis kodas",
"enable-double-click-to-edit": "Įgalinkite dukart spustelėdami redaguoti",
"label": "Sistema",
- "max-upload-size": "Maksimalus įkėlimo dydis (MiB)",
- "max-upload-size-hint": "Rekomenduojama vertė yra 32 MiB.",
"server-name": "Serverio pavadinimas"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/lv.json b/web/src/locales/lv.json
index 3fdcad816..9b4a1560a 100644
--- a/web/src/locales/lv.json
+++ b/web/src/locales/lv.json
@@ -714,8 +714,6 @@
"custom-code-title": "Pielāgots kods",
"enable-double-click-to-edit": "Iespējojiet dubultklikšķi, lai rediģētu",
"label": "Sistēma",
- "max-upload-size": "Maksimālais augšupielādes lielums (MiB)",
- "max-upload-size-hint": "Ieteicamā vērtība ir 32 MiB.",
"server-name": "Servera nosaukums"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/mr.json b/web/src/locales/mr.json
index ea9695914..f9d253fee 100644
--- a/web/src/locales/mr.json
+++ b/web/src/locales/mr.json
@@ -496,8 +496,6 @@
"title": "सर्व्हर सानुकूलित करा"
},
"enable-double-click-to-edit": "डबल क्लिकने संपादन सक्षम करा",
- "max-upload-size": "कमाल अपलोड आकार (MiB)",
- "max-upload-size-hint": "शिफारस केलेले मूल्य 32 MiB आहे.",
"server-name": "सर्व्हरचे नाव",
"label": "प्रणाली",
"additional-script-description": "प्रत्येक वेब पेजमध्ये जावास्क्रिप्ट इंजेक्ट करा. फक्त विश्वसनीय कोड वापरा.",
@@ -607,7 +605,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/nb.json b/web/src/locales/nb.json
index bc4f82590..7c7a8ac03 100644
--- a/web/src/locales/nb.json
+++ b/web/src/locales/nb.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Slå på dobbeltklikk for å redigere",
"label": "System",
- "max-upload-size": "Maksimal opplastingsstørrelse (MiB)",
- "max-upload-size-hint": "Anbefalt verdi er 32 MiB.",
"server-name": "Servernavn",
"additional-script-description": "Injiser JavaScript på hver nettside. Bruk kun pålitelig kode.",
"additional-style-description": "Injiser CSS i nettappen for å justere presentasjonen for hele forekomsten.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/nl.json b/web/src/locales/nl.json
index 529462856..20ed08c68 100644
--- a/web/src/locales/nl.json
+++ b/web/src/locales/nl.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Dubbelklik om te bewerken inschakelen",
"label": "Systeem",
- "max-upload-size": "Maximum uploadgrootte (MiB)",
- "max-upload-size-hint": "32 MiB wordt aangeraden.",
"server-name": "Servernaam",
"additional-script-description": "Injecteer JavaScript in elke webpagina. Gebruik alleen vertrouwde code.",
"additional-style-description": "Injecteer CSS in de webapp om de presentatie voor de hele instantie aan te passen.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/nn.json b/web/src/locales/nn.json
index 56acb3f15..af5c3b059 100644
--- a/web/src/locales/nn.json
+++ b/web/src/locales/nn.json
@@ -926,8 +926,6 @@
},
"enable-double-click-to-edit": "Slå på dobbeltklikk for redigering",
"label": "System",
- "max-upload-size": "Største opplastingsstorleik (MiB)",
- "max-upload-size-hint": "Tilrådd verdi er 32 MiB.",
"server-name": "Tenarnamn"
},
"tags": {
@@ -957,7 +955,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/pl.json b/web/src/locales/pl.json
index 8be690d39..0b8d3e7ac 100644
--- a/web/src/locales/pl.json
+++ b/web/src/locales/pl.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Włącz edycję przez podwójne kliknięcie",
"label": "System",
- "max-upload-size": "Maksymalny rozmiar przesyłanego pliku (MiB)",
- "max-upload-size-hint": "Zalecana wartość to 32 MiB.",
"server-name": "Nazwa serwera",
"additional-script-description": "Wstrzyknij JavaScript do każdej strony internetowej. Używaj tylko zaufanego kodu.",
"additional-style-description": "Wstrzyknij CSS do aplikacji internetowej, aby dostosować prezentację w całej instancji.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/pt-BR.json b/web/src/locales/pt-BR.json
index 4bf620e41..28592cd5a 100644
--- a/web/src/locales/pt-BR.json
+++ b/web/src/locales/pt-BR.json
@@ -496,8 +496,6 @@
"title": "Personalizar instância"
},
"enable-double-click-to-edit": "Ativar clique duplo para editar",
- "max-upload-size": "Tamanho máximo de upload (MiB)",
- "max-upload-size-hint": "O valor recomendado é 32 MiB.",
"server-name": "Nome da instância",
"label": "Sistema",
"additional-script-description": "Injetar JavaScript em todas as páginas da web. Usar somente código confiável.",
@@ -607,7 +605,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/pt-PT.json b/web/src/locales/pt-PT.json
index 2eedf1cfa..4fab8df3e 100644
--- a/web/src/locales/pt-PT.json
+++ b/web/src/locales/pt-PT.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Ativar duplo clique para editar",
"label": "Sistema",
- "max-upload-size": "Tamanho máximo de upload (MiB)",
- "max-upload-size-hint": "O valor recomendado é 32 MiB.",
"server-name": "Nome do Servidor",
"additional-script-description": "Injete JavaScript em todas as páginas da web. Use apenas código confiável.",
"additional-style-description": "Injete CSS no aplicativo Web para ajustar a apresentação de toda a instância.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/ro.json b/web/src/locales/ro.json
index 165e1092c..fa4760e5a 100644
--- a/web/src/locales/ro.json
+++ b/web/src/locales/ro.json
@@ -714,8 +714,6 @@
"custom-code-title": "Cod personalizat",
"enable-double-click-to-edit": "Activați dublu clic pentru a edita",
"label": "Sistem",
- "max-upload-size": "Dimensiunea maximă de încărcare (MiB)",
- "max-upload-size-hint": "Valoarea recomandată este 32 MiB.",
"server-name": "Nume server"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/ru.json b/web/src/locales/ru.json
index 16f227cbe..5b98c301a 100644
--- a/web/src/locales/ru.json
+++ b/web/src/locales/ru.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Редактировать двойным кликом",
"label": "Система",
- "max-upload-size": "Макс. размер файла (МБ)",
- "max-upload-size-hint": "Рекомендуемое значение 32 MБ",
"server-name": "Имя сервера",
"additional-script-description": "Внедрите JavaScript на каждую веб-страницу. Используйте только проверенный код.",
"additional-style-description": "Внедрите CSS в веб-приложение, чтобы настроить представление всего экземпляра.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/sk.json b/web/src/locales/sk.json
index 8f5b8eeb6..aaee9cf15 100644
--- a/web/src/locales/sk.json
+++ b/web/src/locales/sk.json
@@ -714,8 +714,6 @@
"custom-code-title": "Vlastný kód",
"enable-double-click-to-edit": "Povoliť úpravy dvojitým kliknutím",
"label": "Systém",
- "max-upload-size": "Maximálna veľkosť nahrávania (MiB)",
- "max-upload-size-hint": "Odporúčaná hodnota je 32 MiB.",
"server-name": "Názov servera"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/sl.json b/web/src/locales/sl.json
index 9b8f3a7ce..54faa2615 100644
--- a/web/src/locales/sl.json
+++ b/web/src/locales/sl.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Omogoči dvojni klik za urejanje",
"label": "Sistem",
- "max-upload-size": "Največja velikost nalaganja (MiB)",
- "max-upload-size-hint": "Priporočena velikost je 32 MiB.",
"server-name": "Ime strežnika",
"additional-script-description": "Vnesite JavaScript v vsako spletno stran. Uporabljajte samo zaupanja vredno kodo.",
"additional-style-description": "Vnesite CSS v spletno aplikacijo, da prilagodite predstavitev celotne instance.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/sr.json b/web/src/locales/sr.json
index fc2ffe097..62bbd160c 100644
--- a/web/src/locales/sr.json
+++ b/web/src/locales/sr.json
@@ -714,8 +714,6 @@
"custom-code-title": "Прилагођени код",
"enable-double-click-to-edit": "Омогућите двоструки клик за уређивање",
"label": "Систем",
- "max-upload-size": "Максимална величина отпремања (MiB)",
- "max-upload-size-hint": "Препоручена вредност је 32 MiB.",
"server-name": "Име сервера"
},
"usage-limits": {
@@ -728,7 +726,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/sv.json b/web/src/locales/sv.json
index 7c51570cf..a9acccfaf 100644
--- a/web/src/locales/sv.json
+++ b/web/src/locales/sv.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Aktivera dubbelklick för att redigera",
"label": "System",
- "max-upload-size": "Maximal uppladdningsstorlek (MiB)",
- "max-upload-size-hint": "Rekommenderat värde är 32 MiB.",
"server-name": "Servernamn",
"additional-script-description": "Injicera JavaScript i varje webbsida. Använd endast betrodd kod.",
"additional-style-description": "Injicera CSS i webbappen för att justera instansomfattande presentation.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/th.json b/web/src/locales/th.json
index 458c96a29..f0839058e 100644
--- a/web/src/locales/th.json
+++ b/web/src/locales/th.json
@@ -496,8 +496,6 @@
"title": "ปรับแต่งเซิร์ฟเวอร์"
},
"enable-double-click-to-edit": "เปิดใช้งานดับเบิลคลิกเพื่อแก้ไข",
- "max-upload-size": "ขนาดการอัปโหลดสูงสุด (MiB)",
- "max-upload-size-hint": "ค่าที่แนะนำคือ 32 MiB",
"server-name": "ชื่อเซิร์ฟเวอร์",
"label": "ระบบ",
"additional-script-description": "แทรก JavaScript ลงในทุกหน้าเว็บ ใช้เฉพาะโค้ดที่เชื่อถือได้เท่านั้น",
@@ -607,7 +605,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/tr.json b/web/src/locales/tr.json
index 1bced6acd..a97fa92da 100644
--- a/web/src/locales/tr.json
+++ b/web/src/locales/tr.json
@@ -754,8 +754,6 @@
},
"enable-double-click-to-edit": "Düzenlemek için çift tıklamayı etkinleştir",
"label": "Sistem",
- "max-upload-size": "Maksimum yükleme boyutu (MiB)",
- "max-upload-size-hint": "Önerilen değer 32 MiB'dir.",
"server-name": "Sunucu Adı",
"additional-script-description": "JavaScript'i her web sayfasına enjekte edin. Yalnızca güvenilir kodu kullanın.",
"additional-style-description": "Örnek çapında sunumu ayarlamak için CSS'i web uygulamasına enjekte edin.",
@@ -773,7 +771,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/uk.json b/web/src/locales/uk.json
index 478c08d44..fd55f15d3 100644
--- a/web/src/locales/uk.json
+++ b/web/src/locales/uk.json
@@ -593,8 +593,6 @@
},
"enable-double-click-to-edit": "Увімкнути двократне натискання для редагування",
"label": "Система",
- "max-upload-size": "Максимальний розмір завантаження (MiB)",
- "max-upload-size-hint": "Рекомендується значення - 32 MiB.",
"server-name": "Назва сервера",
"additional-script-description": "Вставте JavaScript на кожну веб-сторінку. Використовуйте лише надійний код.",
"additional-style-description": "Вставте CSS у веб-програму, щоб налаштувати презентацію для всього екземпляра.",
@@ -612,7 +610,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/vi.json b/web/src/locales/vi.json
index 80850e6eb..5b2c73539 100644
--- a/web/src/locales/vi.json
+++ b/web/src/locales/vi.json
@@ -496,8 +496,6 @@
"title": "Tùy chỉnh máy chủ"
},
"enable-double-click-to-edit": "Bật nhấp đúp để chỉnh sửa",
- "max-upload-size": "Kích thước tải lên tối đa (MiB)",
- "max-upload-size-hint": "Giá trị đề xuất là 32 MiB.",
"server-name": "Tên máy chủ",
"label": "Hệ thống",
"additional-script-description": "Chèn JavaScript vào mọi trang web. Chỉ sử dụng mã đáng tin cậy.",
@@ -607,7 +605,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/zh-Hans.json b/web/src/locales/zh-Hans.json
index 01b8decd4..49e9b3880 100644
--- a/web/src/locales/zh-Hans.json
+++ b/web/src/locales/zh-Hans.json
@@ -575,8 +575,6 @@
"custom-code-description": "应用到前端的实例范围 CSS 和 JavaScript,可选。",
"custom-code-title": "自定义代码",
"enable-double-click-to-edit": "启用双击编辑",
- "max-upload-size": "最大上传大小 (MiB)",
- "max-upload-size-hint": "建议值为 32 MiB。",
"server-name": "服务器名称",
"label": "系统"
},
@@ -681,7 +679,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/locales/zh-Hant.json b/web/src/locales/zh-Hant.json
index 17352ccb0..b00b81b7c 100644
--- a/web/src/locales/zh-Hant.json
+++ b/web/src/locales/zh-Hant.json
@@ -836,8 +836,6 @@
"custom-code-title": "自訂代碼",
"enable-double-click-to-edit": "啟用雙擊編輯",
"label": "系統",
- "max-upload-size": "最大上傳檔案大小 (MiB)",
- "max-upload-size-hint": "建議值為 32 MiB。",
"server-name": "伺服器名稱"
},
"usage-limits": {
@@ -850,7 +848,6 @@
"description": "Keep this instance fast and reliable by capping what each user can store. All users applies to everyone, and a user's own limits replace it. Gray values come from All users.",
"file-size": "Largest file (MiB)",
"file-size-column": "Largest file",
- "file-size-warning": "Not below the instance upload limit of {{limit}} MiB, so it has no effect.",
"invalid": "Enter a whole number of memos, or a size in MiB.",
"label": "Usage limits",
"memos": "Memos",
diff --git a/web/src/types/proto/api/instance_service_pb.ts b/web/src/types/proto/api/instance_service_pb.ts
index 81ee62b01..99aa70e5a 100644
--- a/web/src/types/proto/api/instance_service_pb.ts
+++ b/web/src/types/proto/api/instance_service_pb.ts
@@ -20,7 +20,7 @@ import type { Message } from "@bufbuild/protobuf";
* Describes the file api/instance_service.proto.
*/
export const file_api_instance_service: GenFile = /*@__PURE__*/
- fileDesc("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5IijaQQRuYW1lgtPkkwIbKhkvYXBpL3tuYW1lPXVzYWdlTGltaXRzLyp9QpMBCg1jb20ubWVtb3MuYXBpQhRJbnN0YW5jZVNlcnZpY2VQcm90b1ABWidnaXRodWIuY29tL3VzZW1lbW9zL21lbW9zL3Byb3RvL2dlbi9hcGmiAgNNQViqAglNZW1vcy5BcGnKAglNZW1vc1xBcGniAhVNZW1vc1xBcGlcR1BCTWV0YWRhdGHqAgpNZW1vczo6QXBpYgZwcm90bzM", [file_api_user_service, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_color]);
+ fileDesc("ChphcGkvaW5zdGFuY2Vfc2VydmljZS5wcm90bxIJbWVtb3MuYXBpIqkCCg9JbnN0YW5jZVByb2ZpbGUSDwoHdmVyc2lvbhgBIAEoCRIOCgZjb21taXQYAiABKAkSDAoEZGVtbxgDIAEoCBIUCgxpbnN0YW5jZV91cmwYBCABKAkSMgoLYWNjZXNzX21vZGUYBSABKA4yHS5tZW1vcy5hcGkuSW5zdGFuY2VBY2Nlc3NNb2RlEhMKC25lZWRzX3NldHVwGAYgASgIEh4KBWFkbWluGAcgASgLMg8ubWVtb3MuYXBpLlVzZXISNwoJY2hhbGxlbmdlGAggASgLMiQubWVtb3MuYXBpLkluc3RhbmNlUHJvZmlsZS5DaGFsbGVuZ2UaLwoJQ2hhbGxlbmdlEhAKCHByb3ZpZGVyGAEgASgJEhAKCHNpdGVfa2V5GAIgASgJIhsKGUdldEluc3RhbmNlUHJvZmlsZVJlcXVlc3QikxoKD0luc3RhbmNlU2V0dGluZxIRCgRuYW1lGAEgASgJQgPgQQgSRAoPZ2VuZXJhbF9zZXR0aW5nGAIgASgLMikubWVtb3MuYXBpLkluc3RhbmNlU2V0dGluZy5HZW5lcmFsU2V0dGluZ0gAEkQKD3N0b3JhZ2Vfc2V0dGluZxgDIAEoCzIpLm1lbW9zLmFwaS5JbnN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zEqMBChBVcGRhdGVVc2FnZUxpbWl0EiIubWVtb3MuYXBpLlVwZGF0ZVVzYWdlTGltaXRSZXF1ZXN0GhUubWVtb3MuYXBpLlVzYWdlTGltaXQiVNpBF3VzYWdlX2xpbWl0LHVwZGF0ZV9tYXNrgtPkkwI0Ogt1c2FnZV9saW1pdDIlL2FwaS97dXNhZ2VfbGltaXQubmFtZT11c2FnZUxpbWl0cy8qfRJ4ChBEZWxldGVVc2FnZUxpbWl0EiIubWVtb3MuYXBpLkRlbGV0ZVVzYWdlTGltaXRSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IijaQQRuYW1lgtPkkwIbKhkvYXBpL3tuYW1lPXVzYWdlTGltaXRzLyp9QpMBCg1jb20ubWVtb3MuYXBpQhRJbnN0YW5jZVNlcnZpY2VQcm90b1ABWidnaXRodWIuY29tL3VzZW1lbW9zL21lbW9zL3Byb3RvL2dlbi9hcGmiAgNNQViqAglNZW1vcy5BcGnKAglNZW1vc1xBcGniAhVNZW1vc1xBcGlcR1BCTWV0YWRhdGHqAgpNZW1vczo6QXBpYgZwcm90bzM", [file_api_user_service, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_color]);
/**
* InstanceProfile is the basic information about the instance.
@@ -360,24 +360,17 @@ export type InstanceSetting_StorageSetting = Message<"memos.api.InstanceSetting.
*/
filepathTemplate: string;
- /**
- * The maximum upload size in megabytes. Default is 32.
- *
- * @generated from field: int64 upload_size_limit_mb = 4;
- */
- uploadSizeLimitMb: bigint;
-
/**
* Legacy compatibility field. New clients use default_storage_id.
*
- * @generated from field: memos.api.InstanceSetting.StorageSetting.StorageType storage_type = 5;
+ * @generated from field: memos.api.InstanceSetting.StorageSetting.StorageType storage_type = 4;
*/
storageType: InstanceSetting_StorageSetting_StorageType;
/**
* Legacy compatibility field. New clients use storages.
*
- * @generated from field: memos.api.InstanceSetting.StorageSetting.S3Config s3_config = 6;
+ * @generated from field: memos.api.InstanceSetting.StorageSetting.S3Config s3_config = 5;
*/
s3Config?: InstanceSetting_StorageSetting_S3Config | undefined;
};
@@ -1332,8 +1325,7 @@ export type UsageLimit = Message<"memos.api.UsageLimit"> & {
user: string;
/**
- * Required. The limit. Must not be negative. 0 means unlimited for MEMOS and
- * STORAGE_BYTES, and no extra limit for UPLOAD_BYTES.
+ * Required. The limit. Must not be negative. 0 means unlimited.
*
* @generated from field: int64 value = 4;
*/
@@ -1389,8 +1381,7 @@ export enum UsageLimit_Metric {
STORAGE_BYTES = 2,
/**
- * The size in bytes of one uploaded file. It can only lower the instance
- * upload limit, never raise it.
+ * The size in bytes of one uploaded file.
*
* @generated from enum value: UPLOAD_BYTES = 3;
*/
diff --git a/web/src/types/proto/api/user_service_pb.ts b/web/src/types/proto/api/user_service_pb.ts
index abb2c6db7..c8081592f 100644
--- a/web/src/types/proto/api/user_service_pb.ts
+++ b/web/src/types/proto/api/user_service_pb.ts
@@ -996,8 +996,7 @@ export type UserUsage = Message<"memos.api.UserUsage"> & {
storageBytesLimit?: UserUsage_EffectiveLimit | undefined;
/**
- * The limit on the size of one uploaded file. It applies only when it is
- * lower than the instance upload limit.
+ * The limit on the size of one uploaded file.
*
* @generated from field: memos.api.UserUsage.EffectiveLimit upload_bytes_limit = 6;
*/
@@ -1019,7 +1018,7 @@ export const UserUsageSchema: GenMessage<UserUsage> = /*@__PURE__*/
*/
export type UserUsage_EffectiveLimit = Message<"memos.api.UserUsage.EffectiveLimit"> & {
/**
- * The limit. 0 means unlimited, or no extra limit for upload_bytes_limit.
+ * The limit. 0 means unlimited.
*
* @generated from field: int64 value = 1;
*/
diff --git a/web/tests/usage-limit-errors.test.ts b/web/tests/usage-limit-errors.test.ts
index 4518c7bf1..8193f354e 100644
--- a/web/tests/usage-limit-errors.test.ts
+++ b/web/tests/usage-limit-errors.test.ts
@@ -2,11 +2,11 @@ import { BinaryWriter } from "@bufbuild/protobuf/wire";
import { Code, ConnectError } from "@connectrpc/connect";
import { describe, expect, it } from "vitest";
import { errorService } from "@/components/MemoEditor/services/errorService";
-import { ERROR_REASON_FILE_TOO_LARGE, ERROR_REASON_QUOTA_EXCEEDED, getErrorMessage, getRetryAfterSeconds } from "@/lib/error";
+import { ERROR_REASON_QUOTA_EXCEEDED, getErrorMessage, getRetryAfterSeconds } from "@/lib/error";
-function quotaError(metadata: Record<string, string>, reason = ERROR_REASON_QUOTA_EXCEEDED): ConnectError {
+function quotaError(metadata: Record<string, string>): ConnectError {
const writer = new BinaryWriter();
- writer.tag(1, 2).string(reason);
+ writer.tag(1, 2).string(ERROR_REASON_QUOTA_EXCEEDED);
writer.tag(2, 2).string("memos.api");
for (const [key, value] of Object.entries(metadata)) {
const entry = new BinaryWriter();
@@ -40,12 +40,6 @@ describe("usage limit refusals", () => {
expect(getRetryAfterSeconds(error)).toBeUndefined();
});
- it("names the instance upload limit", () => {
- const error = quotaError({ limit: String(32 * 1024 ** 2), size: String(40 * 1024 ** 2) }, ERROR_REASON_FILE_TOO_LARGE);
- expect(getErrorMessage(error)).toBe("This file is larger than the upload limit of 32.0 MB.");
- expect(errorService.getErrorMessage(error)).toBe("This file is larger than the upload limit of 32.0 MB.");
- });
-
it("reaches the editor's own error messages", () => {
const error = quotaError({ metric: "UPLOAD_BYTES", limit: String(1024 ** 2), usage: String(2 * 1024 ** 2) });
expect(errorService.getErrorMessage(error)).toBe("This file is larger than your limit of 1.0 MB per file.");
diff --git a/web/tests/usage-limits-settings.test.tsx b/web/tests/usage-limits-settings.test.tsx
index 49f401db9..22ec21167 100644
--- a/web/tests/usage-limits-settings.test.tsx
+++ b/web/tests/usage-limits-settings.test.tsx
@@ -19,7 +19,6 @@ const mocks = vi.hoisted(() => ({
createUsageLimit: vi.fn(),
updateUsageLimit: vi.fn(),
deleteUsageLimit: vi.fn(),
- getInstanceSetting: vi.fn(),
}));
vi.mock("@/connect", () => ({
@@ -29,7 +28,6 @@ vi.mock("@/connect", () => ({
createUsageLimit: mocks.createUsageLimit,
updateUsageLimit: mocks.updateUsageLimit,
deleteUsageLimit: mocks.deleteUsageLimit,
- getInstanceSetting: mocks.getInstanceSetting,
},
}));
vi.mock("@/hooks/useCurrentUser", () => ({ default: () => ({ name: "users/alice" }) }));
@@ -59,7 +57,6 @@ const effective = (value: bigint, usageLimit = "") => create(UserUsage_Effective
beforeEach(() => {
for (const mock of Object.values(mocks)) mock.mockReset();
- mocks.getInstanceSetting.mockResolvedValue({ value: { case: "storageSetting", value: { uploadSizeLimitMb: 30n } } });
mocks.createUsageLimit.mockResolvedValue({});
mocks.updateUsageLimit.mockResolvedValue({});
mocks.deleteUsageLimit.mockResolvedValue({});
@@ -174,7 +171,7 @@ describe("UsageLimitDialog", () => {
],
nextPageToken: "",
});
- render(<UsageLimitDialog open onOpenChange={vi.fn()} target={{ kind: "all" }} candidates={[]} uploadLimitMiB={32} />, { wrapper });
+ render(<UsageLimitDialog open onOpenChange={vi.fn()} target={{ kind: "all" }} candidates={[]} />, { wrapper });
expect(await screen.findByText("Limits for all users")).toBeInTheDocument();
const memos = screen.getByRole("textbox", { name: "Memos" });
@@ -206,7 +203,7 @@ describe("UsageLimitDialog", () => {
],
nextPageToken: "",
});
- render(<UsageLimitDialog open onOpenChange={vi.fn()} target={{ kind: "user", user: bob }} candidates={[]} uploadLimitMiB={32} />, {
+ render(<UsageLimitDialog open onOpenChange={vi.fn()} target={{ kind: "user", user: bob }} candidates={[]} />, {
wrapper,
});
@@ -232,7 +229,7 @@ describe("UsageLimitDialog", () => {
it("adds limits for a picked user", async () => {
mocks.listUsageLimits.mockResolvedValue({ usageLimits: [], nextPageToken: "" });
- render(<UsageLimitDialog open onOpenChange={vi.fn()} target={{ kind: "add" }} candidates={[carol]} uploadLimitMiB={32} />, { wrapper });
+ render(<UsageLimitDialog open onOpenChange={vi.fn()} target={{ kind: "add" }} candidates={[carol]} />, { wrapper });
expect(await screen.findByRole("heading", { name: "Add user limit" })).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Save" })).toBeDisabled();
@@ -240,8 +237,6 @@ describe("UsageLimitDialog", () => {
await chooseOption("User", "@carol");
const fileSize = screen.getByRole("textbox", { name: "Largest file (MiB)" });
await waitFor(() => expect(fileSize).toBeEnabled());
- fireEvent.change(fileSize, { target: { value: "32" } });
- expect(await screen.findByText("Not below the instance upload limit of 32 MiB, so it has no effect.")).toBeInTheDocument();
fireEvent.change(fileSize, { target: { value: "10" } });
fireEvent.click(screen.getByRole("button", { name: "Save" }));