[ckan-dev] File upload via API and ckanclient
Sean Hammond
sean.hammond at okfn.org
Mon Apr 1 20:24:49 UTC 2013
> Well, I was right with my assumption that _post_multipart in
> ckanclient is responsible (and I should have looked there in the
> first place). It turned out that it's missing the
> authentification headers. Putting them there like so:
>
> h.putheader('Authorization', self.api_key)
> h.putheader('X-CKAN-API-Key', self.api_key)
Could you submit a pull request with this fix to ckanclient?
> BTW: anyone here who contributes to ckanclient?
I think ckanclient is pretty much abandoned in its current state. We
want to rewrite it from scratch as a much simpler and thinner client
that supports CKAN's new action API. The code for uploading files
however, will probably be carried forward into the new version.
I believe Daniel Graziotin (on this list) is working on a potental new
API client in Python.
More information about the ckan-dev
mailing list