New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@galaxy-stack/orbit-file-storage

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@galaxy-stack/orbit-file-storage

File storage for Orbit — local and memory drivers with a pluggable StorageDriver interface (S3-ready)

latest
Source
npmnpm
Version
0.6.1
Version published
Maintainers
1
Created
Source

@galaxy-stack/orbit-file-storage

File storage for Orbit — local and memory drivers with a pluggable StorageDriver interface (S3-ready).

npm version License: MIT

Part of the Orbit framework — a NestJS-style backend framework for Bun.

Installation

bun add @galaxy-stack/orbit-file-storage

Usage

import { StorageModule, StorageService, Module, Injectable } from '@galaxy-stack/orbit-file-storage';

@Module({
  imports: [StorageModule.forRoot({ driver: 'local', root: './uploads' })],
})
export class AppModule {}

@Injectable()
export class UploadService {
  constructor(private storage: StorageService) {}

  async saveAvatar(userId: string, bytes: Uint8Array) {
    await this.put(`avatars/${userId}.png`, bytes);
  }
  async put(key: string, data: string | Uint8Array) { return this.driverPut(key, bytes); }
  private driverPut(key: string, data: Uint8Array) { return this.put(key, data); }
}

API: put, get, getText, getJson, putJson, delete, exists, list, copy, size. Keys are validated against traversal (../, absolute paths).

Implement the StorageDriver interface (S3, GCS, …) and pass { driver: 'custom', driverInstance }.

License

MIT

FAQs

Package last updated on 26 Sep 2026

Related posts