Skip to main content

Pinning files

There are three ways to pin content to IPFS via Filebase:

  1. Upload a file to an IPFS bucket via the Filebase Console.
  2. Upload a file via the IPFS S3 API at s3.filebase.com.
  3. Re-pin an existing CID via the Pinning Service API.

Console upload​

  1. Open the Console and click Buckets.
  2. Click into your IPFS bucket.
  3. Upload → File (or Folder).
  4. Pick the file or folder and upload.
  5. Once uploaded, the object's CID appears in the row's metadata.

S3 API upload​

The IPFS endpoint is s3.filebase.com (region us-east-1):

aws --endpoint https://s3.filebase.com s3 cp ./photo.jpg s3://my-ipfs-bucket/

The CID is returned in the response headers as x-amz-meta-cid. Run with --debug to see the full headers, or fetch via s3api head-object after the upload.

Pinning a folder​

Folders pin as CAR files — Content Addressable aRchives. Use the ipfs-car CLI to package a folder into a CAR, then upload with the import=car metadata flag:

npx ipfs-car --pack ./my-folder --output folder.car

aws --endpoint https://s3.filebase.com s3 cp folder.car s3://my-ipfs-bucket/ \
--metadata 'import=car'

The response includes the folder's root CID.

Re-pin an existing CID​

If the content already exists somewhere on IPFS and you just need Filebase to keep it pinned:

curl -X POST https://api.filebase.io/v1/ipfs/pins \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "cid": "<CID>", "name": "my-pin" }'

See the Pinning Service API for the full reference.

What's next​