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 committed Jul 23, 2012
1 parent 5f810ca commit 6849595
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 6849595

Please sign in to comment.