Usage
Returns
Parameters
id
- Type:
string
name (Optional)
- Type:
string
keyvalues (Optional)
- Type:
Record<string, string>
expires_at (Optional)
- Type:
number
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Pinata SDK files.private.update changes the name, group, or key-value metadata on a private IPFS file. Requires the org:files:write permission.
import { PinataSDK } from "pinata";
const pinata = new PinataSDK({
pinataJwt: process.env.PINATA_JWT!,
pinataGateway: "example.mypinata.cloud",
});
const update = await pinata.files.private.update({
id: "52681e41-86f4-407b-8f79-33a7e7e5df68",
name: "New File Name",
})
type FileListItem = {
id: string;
name: string | null;
cid: "pending" | string;
size: number;
numberOfFiles: number;
mimeType: string;
groupId: string;
updatedAt: string;
createdAt: string;
};
stringconst update = await pinata.files.private.update({
id: "8809812b-cd36-499f-b9b3-a37258a9cd6a",
name: "New File Name",
})
stringconst update = await pinata.files.private.update({
id: "8809812b-cd36-499f-b9b3-a37258a9cd6a",
name: "New File Name"
})
Record<string, string>const update = await pinata.files.private.update({
id: "8809812b-cd36-499f-b9b3-a37258a9cd6a",
keyvalues: {
env: "prod"
}
})
numberconst update = await pinata.files.private.update({
id: "8809812b-cd36-499f-b9b3-a37258a9cd6a",
expires_at: 1735689600
})