diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-12 12:02:11 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-08-26 06:33:28 -0700 |
commit | bdd2242155d3192615740661ce52f6fb960d1a05 (patch) | |
tree | 54599b61d8f75e43552932b07792eefd41f21e2a /mediagoblin/storage/cloudfiles.py | |
parent | 0cdebda7fc533384bd725412365325edcbeb038c (diff) | |
download | mediagoblin-bdd2242155d3192615740661ce52f6fb960d1a05.tar.lz mediagoblin-bdd2242155d3192615740661ce52f6fb960d1a05.tar.xz mediagoblin-bdd2242155d3192615740661ce52f6fb960d1a05.zip |
added user upload limits
Diffstat (limited to 'mediagoblin/storage/cloudfiles.py')
-rw-r--r-- | mediagoblin/storage/cloudfiles.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mediagoblin/storage/cloudfiles.py b/mediagoblin/storage/cloudfiles.py index 250f06d4..47c81ad6 100644 --- a/mediagoblin/storage/cloudfiles.py +++ b/mediagoblin/storage/cloudfiles.py @@ -168,6 +168,12 @@ class CloudFilesStorage(StorageInterface): # Copy to storage system in 4096 byte chunks dest_file.send(source_file) + def get_file_size(self, filepath): + """Returns the file size in bytes""" + obj = self.container.get_object( + self._resolve_filepath(filepath)) + return obj.total_bytes + class CloudFilesStorageObjectWrapper(): """ Wrapper for python-cloudfiles's cloudfiles.storage_object.Object |