parent
fa57100cd5
commit
68c9d5e432
2 changed files with 159 additions and 60 deletions
|
@ -15,6 +15,15 @@ class FakeStorage(BaseStorageV2):
|
|||
def _init_path(self, path=None, create=False):
|
||||
return path
|
||||
|
||||
def get_direct_download_url(self, path, expires_in=60, requires_cors=False):
|
||||
try:
|
||||
if self.get_content('supports_direct_download') == 'true':
|
||||
return 'http://somefakeurl'
|
||||
except:
|
||||
pass
|
||||
|
||||
return None
|
||||
|
||||
def get_content(self, path):
|
||||
if not path in _FAKE_STORAGE_MAP:
|
||||
raise IOError('Fake file %s not found' % path)
|
||||
|
|
Reference in a new issue