From f61a41b89d9143b23661e7e9b0ed5cef7d85a413 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 16 Apr 2011 12:46:58 -0500 Subject: [PATCH] Import urlparse! Duh. I should remember to turn flymake-mode on. --- mediagoblin/storage.py | 5 +++-- 1 file 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 . 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") -- 2.25.1