Cs3 Raw [top] File
@app.put("/data") def write(ref: str, request: Request, if_none_match: str = Header(None)): path = resolve_ref(ref) if if_none_match == "*" and path.exists(): raise HTTPException(412, "File exists") path.parent.mkdir(parents=True, exist_ok=True) with path.open("wb") as f: f.write(request.stream()) return "status": "ok"
def resolve_ref(ref: str) -> Path: if ref.startswith("path:"): return ROOT / ref[5:] raise HTTPException(400, "Only path: references supported") cs3 raw
Author: AI Research Unit Version: 1.0 Date: 2026-04-14 Abstract The CS3 (Content Storage as a Service) specification defines a rich API for file synchronization, sharing, and collaboration. However, many implementers and integrators find the full stack complex for edge cases: embedded systems, lightweight microservices, or high-throughput pipelines. This paper presents CS3 Raw — a minimal subset of CS3 focusing on raw binary operations (stat, read, write, delete, list) over HTTP. We provide a practical specification, reference implementation patterns, and benchmarks showing near-filesystem latency with cloud scalability. 1. Introduction CS3 (often associated with projects like Reva, CERNBox, and ownCloud Infinite Scale) defines a gRPC-based API for managing content across heterogeneous storage systems. The full CS3 API includes sharing, public links, metadata dictionaries, versioning, workflows, and garbage collection. The full CS3 API includes sharing, public links,
CS3 Raw drops: shares, public links, garbage collection, file versions, arbitrary metadata, workflows, and space management. Those can be added via sidecar services. 5.1 Server (Python + FastAPI + local filesystem) from fastapi import FastAPI, Header, HTTPException from pathlib import Path import os, json, time app = FastAPI() ROOT = Path("/var/cs3raw") | ReferenceResourceId: ... |
| CS3 Raw | Standard CS3 (gRPC) | |--------------------|-------------------------------------| | stat | Stat() | | read | InitiateDownload() + stream | | write | InitiateUpload() + stream | | delete | Delete() | | list | ListContainerStream() | | Bearer token | Opaque token in Authorization | | ref=path:/... | ReferencePath: ... | | ref=id:... | ReferenceResourceId: ... |