addFile
Add a file the service serves.
Files are encrypted by the node before publishing, so their locations and credentials never appear on chain.
Usage
.({
: 'url',
: 'https://data.example/observations.csv',
: 'GET'
}) FileTypes | Object |
|---|---|
URL | { type: 'url', url, method, headers? } |
IPFS | { type: 'ipfs', hash } |
ARWEAVE | { type: 'arweave', transactionId } |
S3 | { type: 's3', s3Access: { endpoint, bucket, objectKey, ... } } |
FTP | { type: 'ftp', url } |
NODE_PERSISTENT_STORAGE | { type: 'nodePersistentStorage', bucketId, fileName } |
The builder's FileType generic picks which of these addFile accepts.
Returns
- Type:
ServiceBuilder
The service builder instance, to chain further calls with.