[ckan-dev] Uploading files using FIleStore API

Filip Radulovic filiprd at gmail.com
Sun Jul 19 20:47:42 UTC 2015


Hi Ian,

Thanks for the response. If I do as you say and add "--form url=
http://example.com" to the same execution I mentione din the previous email
it creates a resource with the specified url, but no file is uploaded.



--------
Filip Radulovic
www.filip.milstan.net

On Sun, Jul 19, 2015 at 10:35 PM, Ian Ward <ian at excess.org> wrote:

> This is just a problem with the resource validation being overly strict.
> Provide any value for the resource url when uploading and it should work.
> On 19 Jul 2015 3:18 pm, "Filip Radulovic" <filiprd at gmail.com> wrote:
>
>> Hi all,
>>
>> I have installed today a new instance of CKAN using source on Ubuntu
>> 14.04 (I have perviously installed it using package on 12.04).
>>
>> With some problems along the way, I have managed to put everything
>> together so CKAN works, I can upload files, DataStore and DataPush work as
>> well, I have tested some curl commands etc.
>>
>> However, I have one small problem. I get missing value errors when I try
>> to upload a file using FileStore API.  For example, I do
>>
>> *curl -H'Authorization: foo-foo-foo-foo'
>> 'http://127.0.0.1:5000/api/action/resource_create
>> <http://127.0.0.1:5000/api/action/resource_create>' --form
>> upload=/home/filip/Downloads/MyFile.csv --form package_id=foo-foo-foo*
>>
>> and I get
>>
>> *{"help":
>> "http://127.0.0.1:5000/api/3/action/help_show?name=resource_create
>> <http://127.0.0.1:5000/api/3/action/help_show?name=resource_create>",
>> "success": false, "error": {"url": ["Missing value"], "__type": "Validation
>> Error"*
>>
>> If I try to add a resource with link (using --form url=http://example.com)
>> it gets executed successfully.
>>
>> So, any hint on what might be the problem? I searched for some solutions
>> but I couldn't figure it out.
>>
>> Cheers
>>
>>
>> --------
>> Filip Radulovic
>> www.filip.milstan.net
>>
>> _______________________________________________
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150719/8b5df475/attachment-0003.html>


More information about the ckan-dev mailing list