okfn / ckanclient-deprecated

DEPRECATED - please see https://github.com/ckan/ckanapi. [Python client library for CKAN]
http://pypi.python.org/pypi/ckanclient
25 stars 17 forks source link

Fix S3 uploading once again. #21

Closed glance- closed 11 years ago

glance- commented 11 years ago

You can't assume that every url returned from ckan api is relative to the api itself. Now we try to figure out what url is the right one, and urljoin does that like a charm.

Second, we can't send any ckan-specific headers to S3. That can break S3 upload in more ways then i can imagine.

Fixes #19

hbunke commented 11 years ago

Thanks! Using urljoin() is pretty clever. Unfortunately now getting the URL via file_metadata (line 584) throws a 404 error. Don't know why. Can you confirm this?

glance- commented 11 years ago

@hbunke minor typo. Now fixed.

hbunke commented 11 years ago

Confirmed. Works, at least for local storage. Thanks again!