]> www.vanbest.org Git - motioneye-debian/commitdiff
upload services: MAX_FILE_SIZE generalized and increased to 1GB
authorCalin Crisan <ccrisan@gmail.com>
Tue, 7 Feb 2017 18:59:48 +0000 (20:59 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Tue, 7 Feb 2017 18:59:48 +0000 (20:59 +0200)
motioneye/uploadservices.py

index 9246cb0e8225bce2e4a03283f22efb416962dda2..c389491e2aeb8c7b5ea9d07b2c6ebfd36591779c 100644 (file)
@@ -32,6 +32,8 @@ _services = None
 
 
 class UploadService(object):
+    MAX_FILE_SIZE = 1024 * 1024 * 1024  # 1GB
+    
     NAME = 'base'
 
     def __init__(self, camera_id, **kwargs):
@@ -144,7 +146,6 @@ class GoogleDrive(UploadService):
     CREATE_FOLDER_URL = 'https://www.googleapis.com/drive/v2/files'
 
     BOUNDARY = 'motioneye_multipart_boundary'
-    MAX_FILE_SIZE = 128 * 1024 * 1024 # 128 MB
     
     FOLDER_ID_LIFE_TIME = 300 # 5 minutes
 
@@ -439,8 +440,6 @@ class Dropbox(UploadService):
     LIST_FOLDER_URL = 'https://api.dropboxapi.com/2/files/list_folder'
     UPLOAD_URL = 'https://content.dropboxapi.com/2/files/upload'
 
-    MAX_FILE_SIZE = 128 * 1024 * 1024 # 128 MB
-
     def __init__(self, camera_id, location=None, authorization_key=None, credentials=None, **kwargs):
         self._location = location
         self._authorization_key = authorization_key