If I try to add a directory with curl, I get a message from curl:
“curl (43) A libcurl function was given a bad argument”
Is anyone uploading directories successfully?
If I try to add a directory with curl, I get a message from curl:
“curl (43) A libcurl function was given a bad argument”
Is anyone uploading directories successfully?
I don’t think you can do --recursive
with curl.
However, if you are ok with having a flat directory, you can upload multiple files with wrap-with-directory=true
feature:
echo "1" > 1.txt; echo "2" > 2.txt;
curl "http://localhost:5001/api/v0/add?wrap-with-directory=true" -F file=@1.txt -F file=@2.txt
You can take the resulting hashes and then build desired directory structure using ipfs object patch add-link
.