diff --git a/src/main/kotlin/moe/kageru/kodeshare/Routes.kt b/src/main/kotlin/moe/kageru/kodeshare/Routes.kt index c24051b..44d0753 100644 --- a/src/main/kotlin/moe/kageru/kodeshare/Routes.kt +++ b/src/main/kotlin/moe/kageru/kodeshare/Routes.kt @@ -85,9 +85,9 @@ object Routes { respond(HttpStatusCode.BadRequest, "Empty pastes are not allowed") return null } - if (content.length > 1024 * 1024) { - Log.info("Rejecting paste over 1MB") - respond(HttpStatusCode.BadRequest, "Pastes are limited to 1MB each") + if (content.length > 65535) { + Log.info("Rejecting paste over 64k") + respond(HttpStatusCode.BadRequest, "Pastes are limited to 64 KiB") return null } val uri = PasteDao.insert(Paste(content, DateTime.now(), Paste.randomUri())).data.uri diff --git a/src/main/kotlin/moe/kageru/kodeshare/pages/AboutPage.kt b/src/main/kotlin/moe/kageru/kodeshare/pages/AboutPage.kt index 1c17c72..bf61a09 100644 --- a/src/main/kotlin/moe/kageru/kodeshare/pages/AboutPage.kt +++ b/src/main/kotlin/moe/kageru/kodeshare/pages/AboutPage.kt @@ -58,7 +58,7 @@ object AboutPage { } h3 { +"Expiration & limits" } p { - +"All pastes are limited to 1 MiB, and empty pastes are rejected." + +"All pastes are limited to 64 KiB, and empty pastes are rejected." br +"Right now, pastes are not pruned or deleted at all. " +"If more people start using this, I might add something that deletes unaccessed pastes after a few months. We’ll see."