ipfs-cluster: github.com/ipfs/ipfs-cluster/adder/adderutils Index | Files

package adderutils

import "github.com/ipfs/ipfs-cluster/adder/adderutils"

Package adderutils provides some utilities for adding content to cluster.


Package Files


func AddMultipartHTTPHandler Uses

func AddMultipartHTTPHandler(
    ctx context.Context,
    rpc *rpc.Client,
    params *api.AddParams,
    reader *multipart.Reader,
    w http.ResponseWriter,
    outputTransform func(*api.AddedOutput) interface{},
) (cid.Cid, error)

AddMultipartHTTPHandler is a helper function to add content uploaded using a multipart request. The outputTransform parameter allows to customize the http response output format to something else than api.AddedOutput objects.

Package adderutils imports 12 packages (graph) and is imported by 2 packages. Updated 2020-06-07. Refresh now. Tools for package owners.