When you are uploading data to Swarm, it can take some time until this is completed. In order to help you validate whether the upload is completed or to estimate how long it will take, you can use the
A tag identifier is automatically created for you on each upload. You can find the tag in the
Swarm-Tag header response. You can view this header response with curl when passing the
--verbose flag to an upload:
While the automatically-generated tag is convenient, with big uploads it might take a while until the bee API returns the headers. What you want to do in this case is to pre-generate the tag and pass this tag along the upload command.
Generate a tag:
In order to upload your data to swarm, you must agree to burn some of your gBZZ to signify to storer and fowarder nodes that the content is important. Before you progress to the next step, you must buy stamps! See this guide on how to purchase an appropriate batch of stamps.
Pass the tag along the upload:
When you manually create the tag, you will be able to view the status of preparing the chunks for upload (
processed) as well as the status of uploading to the network (
To get the current status of an upload, send a GET request to the
tag/<Swarm-Tag> API endpoint.
The response contains all the information that you need to follow the status of your file as it is synced with the network.
The number which the tags endpoint is returning under
synced are the number of chunks, Swarms canonical data unit of 4kb