From 9b0c69bcd3d05e3097ec4197ba7ef8f3a350a45d Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 14 Sep 2015 18:58:15 +0200 Subject: fb.py: Use correct config field for max request size Signed-off-by: Florian Pritz --- fb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fb.py b/fb.py index 0bd2453..58e80f7 100755 --- a/fb.py +++ b/fb.py @@ -91,7 +91,7 @@ class CURLWrapper: if filesize > self.serverConfig["upload_max_size"]: raise APIException("File too big") - if self.serverConfig is not None and (currentChunkSize + filesize > self.serverConfig["upload_max_size"] \ + if self.serverConfig is not None and (currentChunkSize + filesize > self.serverConfig["request_max_size"] \ or len(chunks[currentChunk]) >= self.serverConfig["max_files_per_request"]): currentChunkSize = 0 currentChunk += 1 @@ -337,7 +337,7 @@ class FBClient: def parseConfig(self, file): c = ConfigParser(file) self.config = c.get_config() - self.config["api_url"] = self.config["pastebin"]+"/api/v1.1.0" + self.config["api_url"] = self.config["pastebin"]+"/api/v2.0.0" self.config["warnsize"] = 10*1024*1024 self.config["min_files_per_request_default"] = 5 self.config["min_variables_per_request_default"] = 20 -- cgit v1.2.3-24-g4f1b