[ckan-dev] Uploading files using FIleStore API

Filip Radulovic filiprd at gmail.com
Sun Jul 19 19:17:17 UTC 2015


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


More information about the ckan-dev mailing list