[ckan-dev] Uploading files using FIleStore API

Ian Ward ian at excess.org
Sun Jul 19 20:35:44 UTC 2015


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20150719/f3d3db09/attachment-0003.html>


More information about the ckan-dev mailing list