Skip to content

Commit

Permalink
Fix for relative url being used when doing file upload to local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjones authored and amercader committed Aug 1, 2012
1 parent ae181d3 commit 3c0df27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/controllers/storage.py
Expand Up @@ -269,6 +269,9 @@ def get_metadata(self, label):
label=label,
qualified=False
)
if url.startswith('/'):
url = config.get('ckan.site_url','') + url

if not self.ofs.exists(bucket, label):
abort(404)
metadata = self.ofs.get_metadata(bucket, label)
Expand Down

0 comments on commit 3c0df27

Please sign in to comment.