How can I add 10000 files to the same directory with Infura api?

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)

Hi @ghking6 and welcome to our Infura community.

Here’s the updated documentation that should provide some better insights. https://infura.io/docs/ipfs#operation/add