diff options
Diffstat (limited to 'fbin/file_storage/base.py')
-rw-r--r-- | fbin/file_storage/base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fbin/file_storage/base.py b/fbin/file_storage/base.py index abdf580..aa2c510 100644 --- a/fbin/file_storage/base.py +++ b/fbin/file_storage/base.py @@ -13,6 +13,10 @@ class BaseStorage: if size_limit is not None and file.size > size_limit: raise FileSizeError('The file size is too large (max {})'.format(File.pretty_size(size_limit))) + def upload_file(self, uploaded_file, file_hash, user): + '''Upload data from uploaded_file.''' + raise NotImplementedError() + def add_file(self, file_hash, filename, size, user=None, ip=None, verify=True): '''Adds the file to the database. @@ -29,6 +33,10 @@ class BaseStorage: '''Store uploaded_file.''' raise NotImplementedError() + def file_exists(self, f): + '''Return True if the specified file exists. ''' + raise NotImplementedError() + def get_file(self, f): '''Return a file object for the specified file. |