ckanapi icon indicating copy to clipboard operation
ckanapi copied to clipboard

File uploads don't work against on remote API calls

Open amercader opened this issue 7 years ago • 5 comments

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.

amercader avatar Nov 10 '17 13:11 amercader

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

wardi avatar Nov 10 '17 14:11 wardi

Yes, same result.

amercader avatar Nov 10 '17 14:11 amercader

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 avatar Nov 10 '17 18:11 wardi

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

wardi avatar Nov 10 '17 18:11 wardi

@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?

wardi avatar Dec 13 '17 15:12 wardi