From d574e734e19d5350992bc1aeb00014c41a444add Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 27 Nov 2017 09:44:51 -0300 Subject: [feature] add implementation for get_blob_size --- src/leap/soledad/server/_blobs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/leap') diff --git a/src/leap/soledad/server/_blobs.py b/src/leap/soledad/server/_blobs.py index 5670c562..5f5ae5ac 100644 --- a/src/leap/soledad/server/_blobs.py +++ b/src/leap/soledad/server/_blobs.py @@ -144,7 +144,8 @@ class FilesystemBlobsBackend(object): pass def get_blob_size(self, user, blob_id, namespace=''): - raise NotImplementedError + blob_path = self._get_path(user, blob_id, namespace) + return os.stat(blob_path).st_size def count(self, user, request, namespace=''): base_path = self._get_path(user, namespace=namespace) -- cgit v1.2.3