File size limit default to 10MB

This commit is contained in:
shortcutme 2017-05-23 12:41:37 +02:00
parent 3f59727ab6
commit aacde33614
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 8 additions and 1 deletions

View file

@ -683,6 +683,12 @@ class Site(object):
))
return False
self.downloadContent(file_info["content_inner_path"])
if file_info.get("size", 0) > config.file_size_limit * 1024 * 1024:
self.log.debug(
"File size %s too large: %sMB > %sMB, skipping..." %
(inner_path, file_info.get("size", 0) / 1024 / 1024, config.file_size_limit)
)
return False
task = self.worker_manager.addTask(inner_path, peer, priority=priority)
if blocking: