Pinning Files
This guide will walk you through the process of pinning files to IPFS using Filebase. We offer three methods for pinning files: our JavaScript SDK, our S3 Compatible API, and our web application dashboard. Choose the method that best suits your needs.
Using the JavaScript SDK
Installation
First, you need to install the Filebase SDK. You can do this using npm:
Uploading a File
Once you have the SDK installed, you can use it to pin files to IPFS. Here’s a simple example to get you started
API Reference
S3_KEY
andS3_SECRET
: Your Filebase API credentials.objectManager.upload()
: Pins the provided file to IPFS.
Uploading a Folder
You can also use the Filebase SDK to upload a folder. This will result in an IPFS folder being created.
For more details, refer to the Filebase SDK documentation.
Using the S3 Compatible API
Authentication
Before you can start pinning files using the S3 Compatible API, you need to authenticate using your API key and secret.
Uploading a File
You can upload and pin files using standard S3 operations. Here’s an example using the AWS SDK for JavaScript:
API Reference
endpoint
: Filebase S3 Compatible API endpoint.Bucket
: The name of your S3 bucket.Key
: The path where the file will be stored.Body
: The file content.
For more details, refer to the Filebase S3 API documentation.
Using the Web Application Dashboard
Step-by-Step Guide
Login: Start by logging into your Filebase account.
Tips
Ensure your files are named appropriately before uploading.
You can monitor the pinning status directly from the dashboard.
Last updated