aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-04-10 15:01:00 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-04-10 15:01:00 -0500
commit644614d4dd73b171d069f73dba84b5c081eb6961 (patch)
treeb1e37c4a6eaa58982e907c95decb2bec933b7c42
parent111885814086313ee1206def7eb63149467a9149 (diff)
downloadmediagoblin-644614d4dd73b171d069f73dba84b5c081eb6961.tar.lz
mediagoblin-644614d4dd73b171d069f73dba84b5c081eb6961.tar.xz
mediagoblin-644614d4dd73b171d069f73dba84b5c081eb6961.zip
Added the url_for_file stub to the interface
-rw-r--r--mediagoblin/storage.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/mediagoblin/storage.py b/mediagoblin/storage.py
index a1a3b3a4..87435ff2 100644
--- a/mediagoblin/storage.py
+++ b/mediagoblin/storage.py
@@ -104,6 +104,14 @@ class StorageInterface(object):
# Subclasses should override this method.
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):
"""
If a filename at filepath already exists, generate a new name.
@@ -152,3 +160,6 @@ class BasicFileStorage(StorageInterface):
def delete_file(self, filepath):
pass
+
+ def url_for_file(self, filepath):
+ pass