xftp: add quota param to server CLI, restrict chunk sizes (#659)

* xftp: add quota param to server CLI

* only allow certain file sizes, fix tests
This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2023-02-27 18:01:18 +00:00
1 parent 781f8e0000
commit 2f15ce2662
12 files changed
+72 -39

No files matched your search

+1 -4
View File
@@ -52,7 +52,7 @@ xftpClientVersion :: String
xftpClientVersion = "0.1.0"
defaultChunkSize :: Word32
defaultChunkSize = 8 * mb
defaultChunkSize = 4 * mb
smallChunkSize :: Word32
smallChunkSize = 1 * mb
@@ -63,9 +63,6 @@ fileSizeLen = 8
authTagSize :: Int64
authTagSize = fromIntegral C.authTagSize
mb :: Num a => a
mb = 1024 * 1024
newtype CLIError = CLIError String
deriving (Eq, Show, Exception)