UNPKG

ipfs-api

Version:

A client library for the IPFS HTTP API

16 lines (13 loc) 375 B
'use strict' const SendOneFileMultipleResults = require('./send-one-file-multiple-results') module.exports = (send, path) => { const sendFile = SendOneFileMultipleResults(send, path) return (file, options, callback) => { sendFile(file, options, (err, results) => { if (err) { return callback(err) } callback(null, results[0]) }) } }