| Crates.io | armature-storage |
| lib.rs | armature-storage |
| version | 0.1.1 |
| created_at | 2025-12-27 01:45:24.104712+00 |
| updated_at | 2025-12-30 22:33:03.058977+00 |
| description | Multipart file upload and storage handling for Armature |
| homepage | https://pegasusheavy.github.io/armature |
| repository | https://github.com/pegasusheavy/armature |
| max_upload_size | |
| id | 2006566 |
| size | 185,017 |
Object storage for the Armature framework.
[dependencies]
armature-storage = "0.1"
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(())
}
let storage = S3Storage::new("bucket", "region").await?;
let storage = AzureBlobStorage::new("container", "connection_string").await?;
let storage = GcsStorage::new("bucket").await?;
let storage = LocalStorage::new("/data/uploads");
MIT OR Apache-2.0