Added the url_for_file stub to the interface
This commit is contained in:
parent
1118858140
commit
644614d4dd
@ -104,6 +104,14 @@ class StorageInterface(object):
|
|||||||
# Subclasses should override this method.
|
# Subclasses should override this method.
|
||||||
self.__raise_not_implemented()
|
self.__raise_not_implemented()
|
||||||
|
|
||||||
|
def url_for_file(self, filepath):
|
||||||
|
"""
|
||||||
|
Get the URL for this file. This assumes our storage has been
|
||||||
|
mounted with some kind of URL which makes this possible.
|
||||||
|
"""
|
||||||
|
# Subclasses should override this method.
|
||||||
|
self.__raise_not_implemented()
|
||||||
|
|
||||||
def get_unique_filename(self, filepath):
|
def get_unique_filename(self, filepath):
|
||||||
"""
|
"""
|
||||||
If a filename at filepath already exists, generate a new name.
|
If a filename at filepath already exists, generate a new name.
|
||||||
@ -152,3 +160,6 @@ class BasicFileStorage(StorageInterface):
|
|||||||
|
|
||||||
def delete_file(self, filepath):
|
def delete_file(self, filepath):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def url_for_file(self, filepath):
|
||||||
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user