Upload
Upload Data to the Blockchain
Every transaction on the blockchain is a data bundle. Instead of integrating locking and unlocking scripts to the UTXO, one can also upload arbitrary data.
A common use case for uploads is to store NFT images or videos in B://cat protocol format directly on-chain instead of on a server, to ensure the long term availability of the media file.
Our media /upload endpoint is currently available via API to seamlessly upload files.
We currently support uploads up to 20MB on the production server and keep extending the limits. In our prototypes we recently successfully uploaded >1GB files.
Same pruning considerations shall apply to the /upload endpoint.
Swagger UI
post
https://api.relysia.com
/upload
Blockchain File Upload.
1
var parameters = {
2
serviceId: 'optional',
3
walletID: 'optional',
4
body: {
5
type: "media",
6
fileUrl: "https://firebasestorage.googleapis.com/v0/b/musicartdev/o/nftAssets%2F0bb0267f-d5e4-4266-9499-987e2c910451_250x250?alt=media",
7
fileName: "nft relysia",
8
notes: "max notes text length allowed 100K"
9
}
10
}
11
const response = await relysia.upload(parameters);
Copied!
Copy link
Contents
post
/upload