Buckets

ICBucket

ICPay Cloud guide

On-chain encrypted file storage

New bucketPricingGitLab
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions
ICPay

© 2026 ICPay. All rights reserved.

contact@icpay.cloud

Products

  • ICFalcon
  • ICBucket
  • Canisters
  • Top up cycles
  • ICPay Wallet

Explore

  • Channels
  • Blog

Resources

  • Falcon CLI
  • ICP-Hub Packages
  • ICBucket Docs
  • Blog

Company

  • Charity
  • About
  • FAQ
  • Roadmap

Legal

  • Brands
  • Terms
  • Privacy
  • Transparency

Community

  • GitLab
  • X
  • LinkedIn
  • Discord
  • Support
ICPayICPay
  • Blog
Buckets

ICBucket

ICPay Cloud guide

On-chain encrypted file storage

New bucketPricingGitLab
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions

Guides

Basic Usage

Perform essential storage operations: file upload, download, folder listing, file deletion, and metadata tagging.

Basic Usage

This guide covers the core operations supported by ICBucket: uploading files (small and large chunked files), downloading, folder navigation, tagging, and deletion.

Prerequisites

  • An initialized ICBucket instance with write permissions.

Steps

1. Uploading Files

For files smaller than 2MB, single-call upload is instantaneous:

const result = await bucket.uploadFile("docs/spec.pdf", pdfBuffer, {
  contentType: "application/pdf",
  tags: ["documentation", "v1.2"],
  visibility: "public",
})

console.log("Edge URL:", result.publicUrl)

For large files (up to 50MB+), the SDK automatically chunks data into 2MB fragments:

const session = await bucket.uploadLargeFile("videos/demo.mp4", videoStream, {
  contentType: "video/mp4",
  onProgress: (percent) => console.log(`Upload: ${percent}%`),
})

2. Listing Files and Folders

Navigate folders with built-in pagination (10 items per page):

const page = await bucket.listFiles({
  prefix: "images/",
  page: 1,
  pageSize: 10,
})

console.log("Total files:", page.total)
page.items.forEach((file) => console.log(file.name, file.sizeBytes))

3. Deleting Files

Permanently purge an asset and free up allocated canister quota:

await bucket.deleteFile("temp/scratch.png")

Verification

Confirm the file exists and is indexed:

const file = await bucket.getFileInfo("docs/spec.pdf")
console.log("File size:", file.sizeBytes, "Uploaded at:", file.createdAt)

Related Pages

  • Best Practices
  • Endpoints Reference
  • Error Handling
PreviousAuthenticationNextBest Practices

On this page

PrerequisitesSteps1. Uploading Files2. Listing Files and Folders3. Deleting FilesVerificationRelated Pages
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
HomeIntroductionQuick StartInstallationConfigurationAuthenticationBasic UsageBest PracticesAPI OverviewAPI EndpointsAPI RequestsAPI ResponsesError CodesError HandlingTroubleshootingLocal DevelopmentProduction DeploymentConfiguration ReferenceTypes ReferenceChangelogFrequently Asked Questions
ICBucket

On-chain encrypted file storage

Overview

IntroductionQuick StartInstallation

Guides

ConfigurationAuthenticationBasic UsageBest Practices

API Reference

API OverviewAPI EndpointsAPI RequestsAPI Responses

Errors

Error CodesError HandlingTroubleshooting

Deployment

Local DevelopmentProduction Deployment

Reference

Configuration ReferenceTypes ReferenceChangelog

FAQ

Frequently Asked Questions