Support per site max autodownload bigfile size limit changing via API

This commit is contained in:
shortcutme 2018-03-10 02:00:51 +01:00
parent 96e9cc9c32
commit bbb54d6a6a
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 8 additions and 0 deletions

View File

@ -149,6 +149,14 @@ class UiWebsocketPlugin(object):
"file_relative_path": file_relative_path
}
def actionSiteSetAutodownloadBigfileLimit(self, to, limit):
permissions = self.getPermissions(to)
if "ADMIN" not in permissions:
return self.response(to, "You don't have permission to run this command")
self.site.settings["autodownload_bigfile_size_limit"] = int(limit)
self.response(to, "ok")
@PluginManager.registerTo("ContentManager")
class ContentManagerPlugin(object):