Titan Network(EN)
🌟【中文】🌟Official Website
TWS
TWS
  • 👋Welcome to Titan Web Services (TWS)
  • Titan Storage
    • Welcome
    • Quickstart
    • Developer Guides
      • Command Line Interface (CLI)
      • SDK Documentation
        • JS SDK
        • GO SDK
    • How-To Guides
      • Build Examples
      • API Integration
  • Titan container
    • Quick Start Guide
  • Titan PCDN
    • Quick Start Guide
  • Support & Feedback
Powered by GitBook
On this page
  1. Titan Storage
  2. How-To Guides

Build Examples

PreviousHow-To GuidesNextAPI Integration

Last updated 2 months ago

Test example

The test example implements file uploading, listing files that have been uploaded, fetching file, fetching file sharing links, deleting file

1 Register from , and create API Key

2 Build example

git clone github.com/Filecoin-Titan/titan-storage-sdk.git
cd /titan-storage-sdk/example
go build

3 Setting environment variable

export API_KEY=YOUR-API-KEY
export TITAN_URL=https://api-test1.container1.titannet.io

4 run test

4.1 Upload file

./example upload /path/to/file

4.2 List file

./example list

4.3 Get file

./example get --cid=your-file-cid --out=/path/to/save/file

4.4 Get file url (in order to share file)

./example url your-file-cid

4.5 Delete file

./example delete your-file-cid

https://storage.titannet.io