Generate the File Transfer Feature

The file transfer feature adds file upload and download support to your service endpoint, backed by the Object Store.

Generate the file transfer feature like this:

$ saas-rs generate feature --name file-transfer --service user --version 1

The following content is added or changed in your Rust workspace:

crates/
└── user_server/
│   ├── src/
│   │   └── v1/
│   │       ├── controllers/
│   │       │   ├── file.rs
│   │       │   └── mod.rs
│   │       └── mod.rs
│   Cargo.toml
proto/
└── acme/
    └── user/
        └── v1/
            ├── file_info.proto
            ├── file_resource.proto
            └── user_service.proto

The File Controller contains full support for receiving file uploads, storing them in the Object Store, support for later download of the files, and metadata management for attributes such as filename and length.


©2025 SaaS RS | Website | GitHub | GitLab | Contact