Back to all Developer Hub

Upload File to Dragon1 Guide

Introduction

The Cere Developer Console is a comprehensive suite of user-friendly tools designed to onboard App Developers to Dragon 1, the first data cluster in Cereā€™s Decentralized Data Cloud (DDC). This self-service platform, supported by robust smart contracts, enables DDC Clusters to deliver high-powered, automated data cloud operations tailored to developers' needs.

Using the Developer Console (https://developer.console.cere.network/#/login), you can:

  1. Create an account
  2. Receive 50 free tokens
  3. Create your first bucket
  4. Integrate DDC and Media SDK using step-by-step guides

šŸ’” Note: Please use your desktop for tests! Mobile is currently not supported.

For a video of the process, see:

Before you begin, ensure you have:

  • Access to the Cere Developer Console
  • A desktop computer (mobile is not supported)
  • Node.js and npm installed on your machine
  • Basic familiarity with command-line interfaces

Getting Started

  1. Access the Developer Console:
  2. Sign Up:
    • On the Developer Console sign-up page, click the "Start" button.
  3. Connect Your Wallet:
    • Follow the prompts to connect your wallet.
    • If you don't have a wallet yet, you'll be guided to create a Cere Wallet.
  4. Receive Rewards and Create Your First Bucket:
    • Upon successful signup, you'll receive 50 free tokens.
    • Your first bucket will be automatically created.

Setting Up Your Environment

  1. Install Node.js and npm (if not already installed):
    • Download Node.js
    • Follow the installation steps provided on the Node.js website.
  2. Access Your Cere Wallet:
    • Visit the staging wallet at wallet.stg.cere.io.
    • Log in using your email OTP.
    • You'll see your EVM and Cere wallets, along with your $CERE token balance.
  3. Download Wallet Backup:
    • Go to Settings in your Cere wallet.
    • Click "Download" to save your wallet backup JSON file.
    • This file is crucial for accessing your bucket, so keep it secure.

Configuring Your Environment

  1. Create Configuration File:
    • Create a new file named ddcc.config.js.
    • Add the following content, replacing placeholders with your information:
{
  "path": "./your-wallet-address.json",
  "clusterId": "0x7cfe5ddfafd1f0faba7a1194c12e6a0f3d0d6ce9",
  "bucketId": "your-bucket-id",
  "blockchainRpc": "<https://node-partner-test.cere.network/ws>",
  "logLevel": "info"
}

  • The path should point to your wallet backup file.
  • Find your bucketId in the developer console.

Uploading Content to DDC

You have two options for uploading content:

Option 1: Use the File Uploader

  1. In the Developer Console, navigate to the file upload section.
  2. Follow the on-screen instructions to upload your file directly through the interface.

Option 2: Use the DDC CLI to Upload

  1. Prepare Your File:
    • Ensure your file is in a supported format.
    • Place the file in the same directory as your ddcc.config.js.
  2. Use the DDC CLI to Upload:
    • Open a command prompt or terminal.
    • Navigate to the directory containing your config file and video.
    • Run the following command:
npx @cere-ddc-sdk/cli@latest --config=ddcc.config.js upload "your-file-name"

ā€

  1. Verify Upload:
    • After successful upload, you'll receive metadata including:
      • Network (testnet or mainnet)
      • Bucket ID
      • File path
      • Content Identifier (CID)
    • Save this information for future reference.

Accessing Your Uploaded Content

To access your uploaded content, construct the URL using the following format:

  • Testnet: https://cdn.testnet.cere.network/<YOUR_BUCKET_ID>/<YOUR_CID>

Replace <YOUR_BUCKET_ID> and <YOUR_CID> with the values provided after upload.\

Integrating DDC SDK and Media SDK

Follow the step-by-step guides provided in the Developer Console to integrate the DDC SDK and Media SDK into your application. These guides will walk you through the process of:

  1. Setting up your development environment
  2. Installing necessary dependencies
  3. Implementing basic functionality
  4. Testing your integration
Get Started