summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--photoblaster/config.py2
-rw-r--r--photoblaster/modules/base.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/photoblaster/config.py b/photoblaster/config.py
index 698927f..b4ad22e 100644
--- a/photoblaster/config.py
+++ b/photoblaster/config.py
@@ -1,6 +1,6 @@
import os
LOCAL = True
-if os.environ["PB_PRODUCTION"]:
+if os.environ.get("PB_PRODUCTION"):
LOCAL = False
diff --git a/photoblaster/modules/base.py b/photoblaster/modules/base.py
index dcb6a89..ada2504 100644
--- a/photoblaster/modules/base.py
+++ b/photoblaster/modules/base.py
@@ -211,8 +211,11 @@ class Pb(object):
self._file_clean_local()
def file_dict(self):
+ url = "%s/im/%s/%s" % (BASE_URL, self._hashdir, self.filename)
+ if LOCAL:
+ url = "/im/cache/%s" % self.filename
return {
- 'url': "%s/im/%s/%s" % (BASE_URL, self._hashdir, self.filename),
+ 'url': url,
'size': self.file_size,
'width': "%spx" % self.file_width,
'height': "%spx" % self.file_height,