import { Inject , Injectable } from '@nestjs/common' ; import { Storage , StorageManager } from '@slynova/flydrive' ; import { STORAGE_MODULE_OPTIONS } from './storage.constants' ; import { StorageModuleOptions } from './interfaces' ; @ Injectable ( ) export class StorageService { private storageManager : StorageManager ; constructor ( @ Inject ( STORAGE_MODULE_OPTIONS ) private options ) { this . storageManager = new StorageManager ( options ) ; } getDisk < T extends Storage > ( name ? ) { return this . storageManager . disk < T > ( name ) ; } registerDriver ( name , driver ) { this . storageManager . registerDriver ( name , driver ) ; } }