Skip to main content

Upload folder to IPFS

POSThttps://deep-index.moralis.io/api/v2/ipfs/uploadFolder

Upload multiple files to IPFS and place them in a folder directory.

BODY PARAM
Responses
API KEY
import Moralis  from 'moralis';

try {
const abi = [
{
path: "moralis/logo.jpg",
content: "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3",
},
];

await Moralis.start({
apiKey: 'YOUR_API_KEY',
// ...and any other configuration
});

const response = await Moralis.EvmApi.ipfs.uploadFolder({
abi
});
console.log(response?.result);
} catch (e) {
console.error(e);
}

Response Example
Empty