import { StorageManagerInterface } from "@crusher-shared/lib/storage/interface" ; import * as path from "path" ; export class StorageManager { private storageManager : StorageManagerInterface ; private baseAssetPath : string ; constructor ( storageManager , baseAssetPath ) { this . storageManager = storageManager ; this . baseAssetPath = baseAssetPath ; return this ; } async uploadAsset ( name , buffer ) { return this . storageManager . uploadBuffer ( buffer , path . join ( this . baseAssetPath , name ) ) ; } }