mirror of https://github.com/papermerge/mglib
add upload/download functions
parent
25e973ff79
commit
40f95466c8
|
@ -18,7 +18,7 @@ class Storage:
|
||||||
on local host filesystem
|
on local host filesystem
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, location=None):
|
def __init__(self, location=None, **kwargs):
|
||||||
# by default, this will be something like
|
# by default, this will be something like
|
||||||
# settings.MEDIA_ROOT
|
# settings.MEDIA_ROOT
|
||||||
self._location = location
|
self._location = location
|
||||||
|
@ -27,6 +27,12 @@ class Storage:
|
||||||
def location(self):
|
def location(self):
|
||||||
return self._location
|
return self._location
|
||||||
|
|
||||||
|
def upload(self, doc_path, **kwargs):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def download(self, doc_path, **kwargs):
|
||||||
|
pass
|
||||||
|
|
||||||
def make_sure_path_exists(self, filepath):
|
def make_sure_path_exists(self, filepath):
|
||||||
logger.debug(f"make_sure_path_exists {filepath}")
|
logger.debug(f"make_sure_path_exists {filepath}")
|
||||||
dirname = os.path.dirname(filepath)
|
dirname = os.path.dirname(filepath)
|
||||||
|
|
Loading…
Reference in New Issue