diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-04-16 12:46:58 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-04-16 12:46:58 -0500 |
commit | f61a41b89d9143b23661e7e9b0ed5cef7d85a413 (patch) | |
tree | ccdcd802eed7b4a0e2718f735f0ac45b1aefa89d | |
parent | d024806a0b3c027a19b0b0462a7633c457c01f8a (diff) | |
download | mediagoblin-f61a41b89d9143b23661e7e9b0ed5cef7d85a413.tar.lz mediagoblin-f61a41b89d9143b23661e7e9b0ed5cef7d85a413.tar.xz mediagoblin-f61a41b89d9143b23661e7e9b0ed5cef7d85a413.zip |
Import urlparse! Duh. I should remember to turn flymake-mode on.
-rw-r--r-- | mediagoblin/storage.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mediagoblin/storage.py b/mediagoblin/storage.py index 90322f5a..c39f5325 100644 --- a/mediagoblin/storage.py +++ b/mediagoblin/storage.py @@ -15,6 +15,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. import os +import urlparse import uuid from werkzeug.utils import secure_filename @@ -106,7 +107,7 @@ class StorageInterface(object): # Subclasses should override this method. self.__raise_not_implemented() - def url_for_file(self, filepath): + def file_url(self, filepath): """ Get the URL for this file. This assumes our storage has been mounted with some kind of URL which makes this possible. @@ -176,7 +177,7 @@ class BasicFileStorage(StorageInterface): # checks to avoid race conditions). os.remove(self._resolve_filepath(filepath)) - def url_for_file(self, filepath): + def file_url(self, filepath): if not self.base_url: raise NoWebServing( "base_url not set, cannot provide file urls") |