You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

nestjs-google-cloud-storage

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestjs-google-cloud-storage

Google Cloud Storage as a very simple Module for NestJS framework.

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

nestjs-google-cloud-storage

Google Cloud Storage as a very simple Module for NestJS framework

Installation

yarn add nestjs-google-cloud-storage
npm install --save nestjs-google-cloud-storage

Usage

You can load it as a global module and then just inject it normaly.

import { StorageModule } from 'nestjs-google-cloud-storage';

@Module({
  imports: [
    StorageModule.forRoot({
      bucket: 'your-bucket-name', // This is optional
      isGlobal: true,
    })
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
import { StorageService } from 'nestjs-google-cloud-storage';

@Injectable()
export class CustomService {
  constructor(
    private readonly storageService: StorageService,
  ) {}

  create() {
    const writableFile = this.storageService.createFileStream(
          `filename.wav`,
          { contentType: 'audio/x-wav' },
        );
  }
}

Keywords

gcp

FAQs

Package last updated on 11 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts