Move the upload flag to the database, and use the database stored image size rather than going to s3.

This commit is contained in:
Jake Moshenko 2014-05-02 16:59:46 -04:00
parent 21304a5678
commit ef9fe871fc
7 changed files with 35 additions and 36 deletions

View file

@ -171,12 +171,3 @@ class S3Storage(BaseStorage):
path += '/'
for key in self._s3_bucket.list(prefix=path):
key.delete()
def get_size(self, path):
self._initialize_s3()
path = self._init_path(path)
# Lookup does a HEAD HTTP Request on the object
key = self._s3_bucket.lookup(path)
if not key:
raise OSError('No such key: \'{0}\''.format(path))
return key.size