mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-10-22 19:42:34 +00:00
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:
1 parent
781f8e0000
commit
2f15ce2662
12 files changed
+72
-39
No files matched your search
@@ -19,6 +19,7 @@ import Data.List.NonEmpty (NonEmpty (..))
|
||||
import Data.Word (Word32)
|
||||
import qualified Network.HTTP.Types as N
|
||||
import qualified Network.HTTP2.Client as H
|
||||
import Simplex.FileTransfer.Description (mb)
|
||||
import Simplex.FileTransfer.Protocol
|
||||
import Simplex.FileTransfer.Transport
|
||||
import Simplex.Messaging.Client
|
||||
@@ -122,7 +123,6 @@ sendXFTPCommand XFTPClient {config, http2Client = http2@HTTP2Client {sessionId}}
|
||||
_ -> pure (r, body)
|
||||
Left e -> throwError $ PCEResponseError e
|
||||
where
|
||||
mb = 1024 * 1024
|
||||
streamBody :: ByteString -> (Builder -> IO ()) -> IO () -> IO ()
|
||||
streamBody t send done = do
|
||||
send $ byteString t
|
||||
|
||||
Reference in new issue
Block a user