aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-04-16 12:46:58 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-04-16 12:46:58 -0500
commitf61a41b89d9143b23661e7e9b0ed5cef7d85a413 (patch)
treeccdcd802eed7b4a0e2718f735f0ac45b1aefa89d
parentd024806a0b3c027a19b0b0462a7633c457c01f8a (diff)
downloadmediagoblin-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.py5
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")