[ckan-dev] CKAN API Clients

Haq, Salman Salman.Haq at neustar.biz
Wed Apr 25 16:16:16 UTC 2012



On 4/25/12 12:09 PM, "Sean Hammond" <sean.hammond at okfn.org> wrote:

>> > Ok, I read and re-read the filestore documentation. The following
>> > snippet from [2]:
>> > 
>> > "Provides credentials for doing operations on storage directly from a
>> > client (using web form style POSTs)."
>> > 
>> > Suggests that it should be possible to upload a file. However there
>> > aren't many details and no working examples.
>> > 
>> > The ckanclient lib also has some methods related to the storage api.
>> > However they too lack any documentation or examples.  The test classes
>> > in [3] also don't seem to test file uploading.
>> 
>> Hmm. I'll take a look into this soon and see if I can figure it out and
>> maybe improve the docs
>
>On looking into this, it does look as if there's some code in CKAN for
>uploading files to the filestore via the API, but this code isn't
>documented or tested very well, so I'd consider it unsupported for now.
>I recommend you go forward with the side-loading via scp/rsync approach
>that we discussed.
>
>A number of people have asked about uploading to the filestore via the
>api recently, so we may allocate some time to get this code fixed up
>with proper tests and docs at some point in the next few weeks.

Sean,

Thanks for looking into this. I was just about to write to you to report
that I've figured out how to use the existing API to upload a file.

In ckanclient.loaders, I'm going to add a 'util' module which will have a
couple of functions to upload a file and add a resource to a package. Let
me know if the location is okay.

I'll follow-up with more info shortly.

Thanks,
Salman


>
>_______________________________________________
>ckan-dev mailing list
>ckan-dev at lists.okfn.org
>http://lists.okfn.org/mailman/listinfo/ckan-dev





More information about the ckan-dev mailing list