Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

python3 Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
>>> name = "mydir/hello%20world.html"
>>> cid = "d389dee12f943e6488e7c4db988c831c"
>>> import hashlib
>>> import binascii
>>> binascii.hexlify(hashlib.md5((cid + name).encode()).digest()).decode()
'6504693e2cef672c1c5d316002b98991' In the example above, Castor-System-CID = d389dee12f943e6488e7c4db988c831c and Castor-System-Name = mydir/hello%20world.html (which does NOT have the tilde issue). The NID is 6504693e2cef672c1c5d316002b98991.

There is a script in the Support bundle that will help collect the NID as well if you only know the name of the stream. Update your support tools (./updateBundle.sh) in your Support tools directory and you can run this with the proper SCSP_HOST (any Swarm node), bucket, filename, and domain. You must have python3 and requests installed (pip3 install requests) on the system this is run on.

Code Block
languagebash
python3 nidtool.py -n "$SCSP_HOST/BUCKETNAME/FILENAME?domain=DOMAIN"

Step 4: Perform a HEAD on the object by NID.

...