Skip to content

Commit

Permalink
Fix resource downloads to call IUploader plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Psykar committed May 26, 2016
1 parent ed2196b commit df4b05b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ckan/controllers/package.py
Expand Up @@ -1145,7 +1145,7 @@ def resource_download(self, id, resource_id, filename=None):
abort(404, _('Resource not found'))

if rsc.get('url_type') == 'upload':
upload = uploader.ResourceUpload(rsc)
upload = uploader.get_resource_uploader(rsc)
filepath = upload.get_path(rsc['id'])
fileapp = paste.fileapp.FileApp(filepath)
try:
Expand Down
2 changes: 1 addition & 1 deletion ckan/plugins/interfaces.py
Expand Up @@ -1492,7 +1492,7 @@ class IUploader(Interface):
upload resources and group images.
'''

def get_uploader(self):
def get_uploader(self, upload_to, old_filename):
'''Return an uploader object to upload general files that must
implement the following methods:
Expand Down

0 comments on commit df4b05b

Please sign in to comment.