ckan / ckanapi

A command line interface and Python module for accessing the CKAN Action API
Other
176 stars 74 forks source link

File uploads don't work against on remote API calls #128

Open amercader opened 6 years ago

amercader commented 6 years ago

Tested against CKAN 2.7 and master, the following doesn't work for me:

ckanapi action resource_create package_id=9222f234-2839-4864-8463-03dca09d6237 \ 
name="Test upload API 35" \ 
upload=@/home/adria/Downloads/valid.csv \ 
-a XXXX \ 
-r http://localhost:5000

It creates the resource, but no file is nowhere to be seen.

wardi commented 6 years ago

tried upload@/home/adria/Downloads/valid.csv instead?

amercader commented 6 years ago

Yes, same result.

wardi commented 6 years ago

Hmm. I've just tested ckanapi 4.1 against ckan master and I'm able to upload a file with -c or -r Could you give me any more information about your environment?

wardi commented 6 years ago

would also be good to know if uploading a file with curl works but ckanapi -r does not

wardi commented 6 years ago

@amercader more details would be helpful here. Does curl work for you, and if so what are the exact curl and ckanapi commands you're trying?