I have used the add api, but it just seperated to different directory, even if I set the same direcotry.
the following is my python code:
import requests
import json
url = "https://ipfs.infura.io:5001/api/v0/add"
s = requests.session()
s.auth = ("xxxx", "xxxx");
with open('test1.txt', 'rb') as fp:
myfile = {'file': ('mytestdir/test1.txt', fp)}
response = s.post(url, files=myfile)
print (response.text)
with open('test2.txt', 'rb') as fp:
myfile = {'file': ('mytestdir/test2.txt', fp)}
response = s.post(url, files=myfile)
print (response.text)