[ckan-dev] CkanClient file upload & CKAN 2.2

Ian Ward ian at excess.org
Mon Jan 27 19:40:37 UTC 2014


> On 22 January 2014 19:14, Stéphane Guidoin <stephane at opennorth.ca> wrote:
>> 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.)

Hello Stéphane,

I've just released ckanapi-2.4 [1] which now has support for file
uploading. It would be great to have more people testing it :-)

[1]: https://github.com/open-data/ckanapi



More information about the ckan-dev mailing list