Home > @lukso/data-provider-base > BaseFormDataUploader
Base data provider to upload data using a FormData POST. This is a generic class used by all the custom implementations.
Signature:
declare class BaseFormDataUploader
| Method | Modifiers | Description |
|---|---|---|
| addMetadata(dataContent, meta) | ||
| getEndpoint() | Return the endpoint to allow this be used with an old ipfs-http-client implementation. If the proxy is running at /api/v0/add for pinning then you can use the ipfs-http-client pointed to /api/v0 and it will add /add to the end before sending the FormData to the server. This allows you to create a proxy that can be used with the ipfs-http-client. | |
| getPostEndpoint() | Return the fetch endpoint this is going to. Must be overridden by a more specific implementation. | |
| getRequestOptions(dataContent, meta) | Construct options for the underlying fetch call. | |
| getToken() | Return a token if this provider requires authentication. | |
| resolveUrl(result) | Convert the upload JSON result to a URL. In most of the current cases it will read Hash or IpfsHash and return ipfs://${hash}. |
|
| wrapStream(data) | protected |
Wrap ReadStream in a Blob for node if required. |