[ckan-dev] CkanClient file upload & CKAN 2.2

Stéphane Guidoin stephane at opennorth.ca
Wed Jan 22 19:14:44 UTC 2014


Hello,

I have a script based on CkanClient that I use to upload files.

I've upgraded from CKAN 2.0.x to 2.2 and the file upload seem to be broken.
Based on the online documentation, it seems that the filestore API has
changed over v2.2 (http://docs.ckan.org/en/latest/filestore.html): now we
directly have to send the metadata (including the package to assign it)
with the file as a multipart while previously it had to be uploaded and
then assign it.

I could change the CkanClient in order to support that BUT:
- Does the new file upload (resource_create and resource_upload) exposes a
REST interface following the same schema as the one currently used by
CkanClient
- Is there a way to know about the CKAN version from the API? Ideally, the
Ckanclient should be able to support both behaviours based on CKAN.

(That being said, it's a pity that the behaviour of the API was changed and
the API version remained the same.)

Stéphane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140122/9292f313/attachment-0002.html>


More information about the ckan-dev mailing list