I would like to simulate the ipfs command ipfs add 'some string' using the javascript fetch method on url '/http://127.0.0.1:5001/api/v0/add'
the documentation ( https://docs.ipfs.io/reference/api/http/ ) says that an argument arg [file] is needed. I tried using a file instead of a string this way : fetch(/http://127.0.0.1:5001/api/v0/add?arg=some.txt) without any success.
A working example adding a file or a string to ipfs would be greatly appreciated.