armature-storage

Crates.ioarmature-storage
lib.rsarmature-storage
version0.1.1
created_at2025-12-27 01:45:24.104712+00
updated_at2025-12-30 22:33:03.058977+00
descriptionMultipart file upload and storage handling for Armature
homepagehttps://pegasusheavy.github.io/armature
repositoryhttps://github.com/pegasusheavy/armature
max_upload_size
id2006566
size185,017
Joseph R. Quinn (quinnjr)

documentation

README

armature-storage

Object storage for the Armature framework.

Features

  • Multiple Providers - S3, Azure Blob, GCS, local filesystem
  • Unified API - Same interface for all providers
  • Streaming - Stream large files
  • Presigned URLs - Secure temporary access
  • Multipart Upload - Large file uploads

Installation

[dependencies]
armature-storage = "0.1"

Quick Start

use armature_storage::{Storage, S3Storage};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let storage = S3Storage::new("my-bucket", "us-east-1").await?;

    // Upload
    storage.put("files/doc.pdf", bytes).await?;

    // Download
    let data = storage.get("files/doc.pdf").await?;

    // Delete
    storage.delete("files/doc.pdf").await?;

    // Presigned URL
    let url = storage.presigned_url("files/doc.pdf", Duration::from_secs(3600))?;

    Ok(())
}

Providers

AWS S3

let storage = S3Storage::new("bucket", "region").await?;

Azure Blob

let storage = AzureBlobStorage::new("container", "connection_string").await?;

Google Cloud Storage

let storage = GcsStorage::new("bucket").await?;

Local Filesystem

let storage = LocalStorage::new("/data/uploads");

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt