chore: Separate maximum import size config for document/workspace (#6566)

* chore: Separate maximum import size config for document/workspace

* Update .env.sample
This commit is contained in:
Tom Moor
2024-02-20 20:35:31 -08:00
committed by GitHub
parent 15046d00a5
commit 7c03963be1
11 changed files with 50 additions and 19 deletions

View File

@@ -86,6 +86,7 @@ export default class AttachmentHelper {
static presetToExpiry(preset: AttachmentPreset) {
switch (preset) {
case AttachmentPreset.Import:
case AttachmentPreset.WorkspaceImport:
return addHours(new Date(), 24);
default:
return undefined;
@@ -101,7 +102,9 @@ export default class AttachmentHelper {
static presetToMaxUploadSize(preset: AttachmentPreset) {
switch (preset) {
case AttachmentPreset.Import:
return env.MAXIMUM_IMPORT_SIZE;
return env.FILE_STORAGE_IMPORT_MAX_SIZE;
case AttachmentPreset.WorkspaceImport:
return env.FILE_STORAGE_WORKSPACE_IMPORT_MAX_SIZE;
case AttachmentPreset.Avatar:
case AttachmentPreset.DocumentAttachment:
default: