Skip to Content
ProvidersProviders

Providers

FluxMedia supports multiple cloud storage providers through a unified API.

Available Providers

ProviderPackageTransformationsVideo Processing
Cloudinary@fluxmedia/cloudinaryFullYes
AWS S3@fluxmedia/s3NoNo
Cloudflare R2@fluxmedia/r2NoNo

Choosing a Provider

Cloudinary

Best for: Applications needing image/video transformations

  • Resize, crop, format conversion on-the-fly
  • AI-powered tagging and face detection
  • Video transcoding and streaming
  • Higher cost but more features

AWS S3

Best for: Simple file storage with AWS integration

  • Reliable and widely used
  • Integrates well with AWS ecosystem
  • Use with CloudFront + Lambda@Edge for transformations
  • Pay only for storage and transfer

Cloudflare R2

Best for: Cost-effective storage with zero egress fees

  • S3-compatible API
  • No egress fees (great for high-traffic)
  • Use with Cloudflare Images for transformations
  • Fast global distribution via Cloudflare network

Custom Providers

You can create custom providers by implementing the MediaProvider interface:

import type { MediaProvider, UploadResult } from '@fluxmedia/core'; class MyProvider implements MediaProvider { name = 'my-provider'; features = { transformations: { resize: false, crop: false, ... }, capabilities: { signedUploads: true, ... }, storage: { maxFileSize: 100_000_000, supportedFormats: ['*'] }, }; async upload(file, options) { // Your upload logic return { id, url, ... }; } async delete(id) { ... } async get(id) { ... } getUrl(id, transform?) { ... } async uploadMultiple(files, options) { ... } async deleteMultiple(ids) { ... } get native() { return this.client; } }

Use contract tests to verify your provider:

import { createProviderContractTests } from '@fluxmedia/core/testing'; createProviderContractTests('MyProvider', () => new MyProvider({ ... }));
Last updated on