[ckan-dev] Upload using resource_create via API

David Raznick david.raznick at okfn.org
Fri Jan 24 17:33:53 UTC 2014


Hello

This seems to work for me on the the release-v2.2 branch and master.

It may be the version of curl you are sending does not automatically
send through the content-type: multipart/form-data header.

Thanks

David

On 24 January 2014 16:19, Marcelo Rezende <malvre at gmail.com> wrote:
> I'm trying to create a resource uploading a file via API, but return JSON
> decoding error. CKAN version is 2.2a
>
> my command line:
>
> curl http://dados.rs.gov.br/api/action/resource_create -H "Authorization:<my
> auth key>" -F upload=@/Users/rezende/Desktop/menu.json -F
> package_id=testeopendata6
>
>
> I did as the doc:
> http://docs.ckan.org/en/latest/filestore.html?highlight=upload#filestore-api
>
> anyone else had this problem?
>
> --
>
> Marcelo Rezende
> malvre at gmail.com
> http://malvre.com
>
>
> _______________________________________________
> 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
>



More information about the ckan-dev mailing list