uploadFolder
Uploads a local directory to Pinata IPFS as a single folder CID, preserving subdirectories, with resumable per-file uploads. Use it for websites, datasets, or image sets instead of single-file uploads.
Instructions
Upload a local directory to Pinata IPFS as one folder with one CID, keeping its subdirectories. Use this instead of uploadFile when the content is a directory (a website, a dataset, a set of images); use uploadFile for a single file. Every regular file under the directory is sent as its own resumable upload, several at a time, each retried on its own, so a large folder or a flaky connection does not restart from zero. Symlinks are followed only to files inside the allowed directories; skipped entries are listed in the result. When some files fail, the result names them and gives the arguments that send only those files again into the same folder (folderId + paths). Also adds files to an existing folder: pass its folderId and its name (listFolder shows it as root). A folder holds at most folder_max_files files (see getUploadLimits; 30,000 unless the account has its own limit): a new folder of more files is refused before any is sent, with the file count of each top-level subdirectory, so the directory can be uploaded as several folders, one call per subdirectory (directory set to it, with its own name). Progress is reported per file to clients that ask for it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"directory": "<directory>"
},
"name": "uploadFolder"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name of the folder on Pinata; the top directory of every file path in it. Defaults to the directory's name. When adding files to an existing folder, pass that folder's name. | |
| paths | No | Upload only these files: paths relative to the directory, with / separators (e.g. the failed paths of an earlier call). Defaults to every file. | |
| network | No | Whether to upload to public or private IPFS | public |
| folderId | No | ID of an existing folder to upload into, instead of a new one: to send failed files again, or to add files. A file whose path is already in the folder replaces it. | |
| group_id | No | ID of a group to add the folder to | |
| directory | Yes | Path of the local directory to upload (or its file:// URI); must be inside the allowed directories | |
| keyvalues | No | Metadata key-value pairs for the folder | |
| cidVersion | No | CID version of the folder and its files (default v1) | |
| concurrency | No | How many files send their bytes at the same time (default 4) |