[ckan-dev] Filestore API - error

Harald von Waldow harald.vonwaldow at eawag.ch
Thu Jan 12 16:38:40 UTC 2017


On 2017-01-12 17:17 Ian Ward wrote:
> CKAN 2.5 and later shouldn't require the url parameter.

I need to provide the url parameter with 2.5.2. Haven't looked into that
in detail yet, though.

> 
> On Thu, Jan 12, 2017 at 11:15 AM, Matthew Fullerton
> <matt.fullerton at gmail.com> wrote:
>> Hi Pedro,
>> you need to supply a "url" property as well as package_id. The API reference
>> for resource_create also states this, although I'm very curious to see what
>> happens to the URL you provide, assuming the file upload works.
>>
>> -Matt
>>
>>
>> On 12 Jan 2017 5:06 p.m., "Pedro Ferro" <pedro.ferro at gmail.com> wrote:
>>
>> Hi,
>>
>> I must be doing something wrong, when I try to upload a file to CKAN trough
>> Filestore API
>>
>>
>>
>> The goal is to upload a file in CKAN and create the corresponding new
>> Dataset, trough Filestore API.
>>
>>
>>
>> File: /tmp/distrito_conc_escolaridade.geojson
>>
>> Ckan: 127.0.0.1:5000
>>
>>
>>
>> Following the documentation
>> http://docs.ckan.org/en/latest/maintaining/filestore.html
>>
>>
>>
>> I make:
>>
>> curl -H'Authorization: c72f0189-dae9-4606-9e3d-debf5b560268'
>> 'http://localhost:5000/api/action/resource_create' --form
>> upload=/tmp/distrito_conc_escolaridade.geojson --form package_id="teste"
>>
>>
>>
>> The reponse:
>>
>>
>> {"help":
>> "http://10.0.70.130:5000/api/3/action/help_show?name=resource_create",
>> "success": false, "error": {"url": ["Valor em falta"], "__type": "Validation
>> Error"}}
>>
>>
>>
>>
>>
>> At CKAN nothing is uploaded.
>>
>>
>>
>> Anyone know what could be wrong?
>>
>>
>> Thanks,
>> Pedro
>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
>>
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
> 

-- 
Harald von Waldow
Eawag
ICT Services
Ueberlandstrasse 133
8600 Duebendorf
http://www.eawag.ch

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20170112/db95811c/attachment-0003.sig>


More information about the ckan-dev mailing list